Interactive Video Bookmark in Moodle database?
Submitted by BlueEagle on Thu, 02/10/2022 - 20:39
Forums:
Hi all H5P fellow comrades,
I am using H5P interactive video bookmarks in moodle and need a way to retrieve these bookmarks.
Are the bookmarks stored in the database or Json file? if yes, where can I find it.
Thank you for any possible help,
Cheers
otacke
Sat, 02/12/2022 - 10:31
Permalink
Hi!The bookmarks are part of
Hi!
The bookmarks are part of the content's parameters - which are stored in JSON format inside the database :-) The table is hvp, the fields are json_content for the original values as given by the user and filtered for the values that were validated by H5P core.
Best,
Oliver
BlueEagle
Sat, 02/12/2022 - 16:59
Permalink
Thanks Oliver for the tips.
Thanks Oliver for the tips. Amazing, I found it.
Another question:
If I want to add new bookmarks via the json_content that is stored in that database field. Would the new bookmarks be applied automatically to video player or do I have to call somekind of update function to let the video player know that there is new json_content?
otacke
Sun, 02/13/2022 - 20:36
Permalink
The relevant field is the
The relevant field is the filtered field. You can change it directly or change the json_content field, delete the and trigger validation to update the filtered field.
Any change to the filtered field will be used as parameters the next time the content is loaded - but not while it is being displayed, of course.
BlueEagle
Mon, 02/14/2022 - 03:09
Permalink
Seems like both json_content
Seems like both json_content and filtered field have same content.
What is your recommendation on the procedure that we should take. Please amend the following sequence:
1. Make changes to json_content field
2. Delete filtered field
3. trigger validation ( How and where in the code to trigger validation? )
4. Refresh or reload content.
otacke
Mon, 02/14/2022 - 17:58
Permalink
Yes, they should if json
Yes, they should if json_content is valid and filtered is the validated version - which is the case normally.
3) The details will depend on your platform, and I don't know much about the moodle specifics. In Drupal, it's done here: https://git.drupalcode.org/project/h5p/-/blob/2.0.0-alpha2/src/Controller/H5PLibraryAdmin.php#L169-196
Cheers
Oliver