Moodle - h5p - 'filtered' concept

Forums: 

Hi All,

This is Mihir, and we are using h5p in many of our courses.

we are using vimeo as one of the link to embed video in h5p. However as vimeo links have expiration time, we have to update the link often. During this update, can somebody guilde me in updating the right details in 'filtered' column.

Also as I understand this 'filterd' data gets generated from the view of the video. So technically this value is empty till somebody views the video.

I want to understand utilisation of this data in entire h5p module. What if, if we keep this field empty always? will it break something?

thank you again for your help and don't hesitate to let me know if you need more information before giving you opinion.

thanks!

MIhir

Summary: 
h5p-moodle
icc's picture

The 'filtered' column is a sort of cache for the 'json_content' column. It contains the value that is safe to send to the browser, stripped of all malicious content/tags.

You could update that column directly, but it might not always be set and then you have to update 'json_content' instead. It is simpler to just always update 'json_content' and then set 'filtered' to a blank string '', as this will trigger the regeneration of that field the next time the content is viewed.