Interactive Book resume: IV score is set to 0 when reloading the page (also reproducible for Summary, Memory game and Find the hotspot)
Description
Environment
production
Acceptance Criteria
Attachments
Activity

Julius Stang January 13, 2025 at 7:36 AM
Thanks for the info. I don’t have any insight into why Hanna did not get back to you on this, but you have a green light from me if you want to implement this.
Oliver Tacke January 8, 2025 at 8:05 AM
No. Didn't get a green light, so I did not.

Julius Stang January 6, 2025 at 7:52 AM
Hey Oliver! I see that Hanna did not reply to your previous question about implementing getCurrentState
for Memory Game and Find the Hotspot. Did you end up implementing this?
Oliver Tacke February 7, 2024 at 10:44 AM
I am sorry. I completely missed that this was not only about IV. Checked the others now.
Summary suffered from a “common” issue of old content types not creating what’s required on instantiation, but only when being attached to the page’s DOM. That can cause trouble if a parent content type does not attach its children right away but calls a child’s functions such as getScore
and the child requires everything to be in place for proper computation. Fixed, see associated pull request.
Memory Game and Find the Hotspot simply do not implement getCurrentState
, so they do not restore a previous state and thus also cannot retrieve a previous score. Should I implement that missing feature then? I don’t expect any huge obstacles here.
Oliver Tacke January 22, 2024 at 1:20 PM
Interactive Video returned a previous state of undefined
if the video
instance was not initialized yet. That can happen due to the preloading mechanism that IB uses which will not create all subcontent instances on startup.
Details
Assignee
UnassignedUnassignedReporter
Gwen Tripet-CostetGwen Tripet-CostetLabels
Code reviewer
Andrei BusuiocAndrei BusuiocSprint
Requriments tested
Requirements testedPriority
Low
Details
Details
Assignee
Reporter

Labels
Code reviewer

Steps to reproduce:
Create an IB containing an IV with some scored content and add to IB some other scored content like Fill in the blanks. Turn on resume feature.
Complete IB and navigate to Summary
Reload the page several times
Actual result:
After the second page reload IV score is set to 0, Total count is still counting IV score
After the third reload Total count also sets IV score to 0
Also if after reproduction user will click Restart, answer again and click Summary, then there will be no “Submit report“ button. I couldn’t reproduce this outside this scenario.
Expected result:
IV and Total score should not be reset after reloading the page.
“Submit report“ button should be available after restarting.
Additional info:
This is reproducible:
on h5pcom directly and through LMS
with all types of IV (uploaded or links)
in all browsers
for users that are answering for the first time and and for users that have already made some attempts
user role doesn’t really matter in this case
Sample content
For Summary, Memory game and Find the hotspot
For these content types inside IB the score is also reset to 0 after page reload. If IB contains all 4 problematic content types, then reset for Summary, Memory game and Find the hotspot will be more obvious as it usually resets after the first reload, and IV will reset after 1-2 more reloads.
Sample content with all scored IB content