Allowing disable the reset of the h5p user data results when drupal (h5p) node is changed

Created on 28 July 2016, almost 8 years ago
Updated 3 March 2023, over 1 year ago

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:

  • Let content author to decide to reset user data (achievement results) or not when saving the node (h5p node).
  • If the content author decide NOT to reset the user data, he or she will have the responsibility for the risk of incorrect user data result if h5p content is CHANGED.

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).

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΉπŸ‡ΌTaiwan hosais

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡Έ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.

Production build 0.69.0 2024