Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-77789

Finishing an H5P attempt deletes the states for all users, not just current user

XMLWordPrintable

    • HQ 2023 Sprint i1.3 Moppies

      In H5P activity, when a new attempt is created when sending xAPI statements, the function wipe_states is called. But right now the userid is not supplied to this function, so it deletes the states for all users.

      How to reproduce:

      1. As admin, enable saving content state in the site.
      2. Create an H5P activity with tracking enabled.
      3. Enrol 2 students in the course.
      4. Open the H5P activity with both users, do something without finishing the activity and then leave the activity so the state is saved.
      5. Check the xapi_states table in the DB, you should see there are 2 states stored for that activity.
      6. With one of the users, open the activity and finish it.
      7. Check the xapi_states table in the DB again, you should see that both states have been deleted.

            sarjona Sara Arjona (@sarjona)
            dpalou Dani Palou
            Carlos Escobedo Carlos Escobedo
            Paul Holden Paul Holden
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 25 minutes
                1h 25m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.