H5P questions do not save previous answers even when save content state frequency is enabled

Created on 24 March 2025, 25 days ago

Problem/Motivation

When a user is answering h5p activities and questions while going through a module. When the user navigates back to a previously answered question their previous answer is not shown. This is even with the Save content state setting enabled under the h5p settings at /admin/config/system/h5p

Steps to reproduce

Create a module and add multiple H5p activities with multiple choice h5p content type.
Go through the module and answer the multi choice questions.
Navigate back to a previous question you've answered and notice you previous selection/answer is not checked/selected.

Proposed resolution

It looks like the h5p field formatter is clearing the contentUserdata used by h5p to save previous states for h5p forms in the following route opigno_module.group.answer_form. Not sure why this needs to be done. Removing the route from the logic fixes it.

πŸ› Bug report
Status

Active

Version

3.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States hablat

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024