Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Points lost at logout in Moodle! #442

Open
Urpokarhu1 opened this issue Mar 21, 2022 · 17 comments
Open

Points lost at logout in Moodle! #442

Urpokarhu1 opened this issue Mar 21, 2022 · 17 comments

Comments

@Urpokarhu1
Copy link

Urpokarhu1 commented Mar 21, 2022

Hello,

There seems to be a bug in at least in two question types

  • summary
  • drag and drop-question

if you logout after completing the activity you lose points you have gained from these question types. It seems like savestate-option doesn't always save point data.

See attached video, original h5p is also attached for testing purposes.

template-592.zip

drag.zip

Tested on

  • Moodle 3.9.12
  • mod_hvp 1.22.4
  • h5p save state set on
  • Summary (1.10.11)
  • Drag and Drop (1.13.15)
drag.mp4
scorelost.mp4
@Urpokarhu1
Copy link
Author

@thomasmars

@otacke
Copy link
Contributor

otacke commented Mar 21, 2022

@Urpokarhu1

The first one might in fact not be related to any content type but caused by H5P core's 3 second delay that it takes after an xAPI completed or progressed event (here emitted by Course Presentation when you go to the summary slide / go to a different slide) to save the state. You can see that the previous state still holds the slide with the Drag and Drop Question and only one element dropped although you ended at the summary slide. You could confirm that by waiting 3 seconds after going to the summary slide before logging out.

The second one seems to be a problem with "Summary" not computing the score correctly when resuming.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 21, 2022

Hello,
thanks for the answer, is there anything holding us back changing the default time from 3000 to 1000?

@otacke
Copy link
Contributor

otacke commented Mar 21, 2022

@Jarvil You'll have to ask the H5P core team. I'm sure that delay was set for a reason.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 21, 2022

Hello,

ok. Should savestate save the points even if I don't reach summary-page?

@otacke
Copy link
Contributor

otacke commented Mar 21, 2022

If admins have set the saveContentState option, H5P is supposed to store the current content's state for the user

  • every saveFreq seconds (the interval that you have set in the options) PLUS
  • 3 seconds after an xAPI event with the verb completed (in Course Presentation triggered when you enter the summary screen) or progressed (in Course Presentation triggered whenever you go to a different slide) PLUS
  • when the browser triggers an unload, beforeunload, pagehide event. The latter is pretty unreliable though.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 22, 2022

Hello,

I have set "content_state_frequency" from 30 to 1 and waited 4 seconds on "total score" -page after answering to the summary-question -> I still lose points after log out and log in from "total score"-page (summary-question pages shows them correctly)

image

image

@otacke
Copy link
Contributor

otacke commented Mar 22, 2022

@Urpokarhu1 As I said, it's a bug in Summary. What you see on screen and what the getScore function returns to Course Presentation are two different things.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 22, 2022

Hello,
Ah ok, thanks for the clarification. I will now test if other types of questions are saved after waiting 4 seconds on the question page after answering and then logout/login.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 22, 2022

Hello,

I tested with drag'n'drop question in course presentation -> gave the answers -> click check-button -> got 3/3 correct -> waited at least 10 seconds -> log out -> log in -> nothing is saved, it doesn't display 3/3 correct. See attached video.

Does this mean saving is only triggered in course presentation on summary slide / total score page?

missing.mp4

@otacke
Copy link
Contributor

otacke commented Mar 22, 2022

@Urpokarhu1 Yes, because you didn't go to a different slide, and thus no xAPI progressed statement was triggered by Course Presentation.

There's a pull request that would also react to the answered statement from Drag and Drop that's triggered by checking the exercise, but that's pending.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 22, 2022

So is it a reliable way to tell end users that after answering any type of question (expect summary-question) their progress is saved after proceeding to the next slide? Advancing to next slide always triggers progressed-statement and points are saved?

@otacke
Copy link
Contributor

otacke commented Mar 22, 2022

@Urpokarhu1 With a three second delay.

@Urpokarhu1
Copy link
Author

Hello,

I tested again with that same course presentation that has Drag'n'Drop question but added second page to that course presentation -> answered to the question and got 3/3 -> proceeded to the next page -> waited at least 10 seconds on it -> log out -> log in -> 3/3 score was not saved.

Didn't you say that progressed-statement should have trigged on page change?

missing3.mp4

@otacke
Copy link
Contributor

otacke commented Mar 22, 2022

@Urpokarhu1 Everything seems to work as expected. "Drag and Drop" has stored the answers that were given, but it doesn't store and re-create the complete "view" state that it was in (e.g. showing results, showing solutions) - only very few content types do.

@Urpokarhu1
Copy link
Author

Urpokarhu1 commented Mar 22, 2022

Thanks for the information.

What about a situtation where I have course presentation with 10 pages and I have question on page 2 and question on page 8.

Do H5P save score from the question on page 2 even if I keep on going to page 5,6,7,8,9,10 ? Or do you need to stop on page 3 for 4 seconds for it to save?

@otacke
Copy link
Contributor

otacke commented Mar 22, 2022

@Urpokarhu1 The position does not matter. The state is always stored for the whole Course Presentation including all the subcontents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants