Interactive Video Bookmark in Moodle database?

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's picture

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 

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's picture

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.

 

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's picture

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