- πΊπΈUnited States partdigital
Re-rolled the patch to work with Drupal 9. I also added in a check to see if h5p_save_content_state was enabled. It doesn't make sense to attempt to update user data if we're not capturing it anyway.
Response to the discussion of https://h5p.org/comment/3567#comment-3567
Summary: The h5p module will reset user data (user achievement for the h5p content) even h5p content itself NOT CHANGED.
Here I will provide a half-way solution:
The content admin need to add a Boolean field "field_reset_h5p_userdata" to the h5p node content type to make this work. The field name must be "field_reset_h5p_userdata" (as attached image).
Needs review
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Re-rolled the patch to work with Drupal 9. I also added in a check to see if h5p_save_content_state was enabled. It doesn't make sense to attempt to update user data if we're not capturing it anyway.