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

Embedded question progress report not retaining data when question is reset #14

Open
alexanderwilliams091 opened this issue Oct 1, 2021 · 3 comments

Comments

@alexanderwilliams091
Copy link

alexanderwilliams091 commented Oct 1, 2021

SITE ENVIRONMENT:

Moodle 3.9.9+ (Build: 20210812)
Embedded questions progress (report_embedquestion) v2020062800
Embed questions (filter_embedquestion) - v2020061000


When using the Embed Quiz Questions feature in Moodle via the Atto text editor, if an Instructor or Student views their "Embedded question progress report" their previous attempt history disappears if you reset your attempt within the embedded question by pressing "Start again"

Steps to replicate:

  1. Create a simple multiple choice Quiz question (default settings excepting an ID number) and have it located within a Category with an ID number so it is usable for embedding purposes

  2. Create any Activity with HTML editing options (E.g. Page activity)

  3. Embed the Quiz question created in step 1 into this activity (use all defaults)

  4. Log in as user with a Student role, attempt and submit the embedded question via the "check" button

  5. Log in as a user with an Instructor/Teacher role and view the Embedded questions progress report. Observe that the student entry from step 4 is visible

  6. Log back in as the student, click "Start again" on the embedded question to reset it

  7. Log back in as the Instructor and view/refresh the embedded questions report. Observe the Student's entry from step 5 is now not visible (shows "Nothing to display")

  8. Log back in as the Student, re-attempt the embedded question and submit

  9. Log back in as the Instructor and view the embedded questions report again. Observe the Student's entry comes back, incl. information on prior attempts.

This behaviour seems to infer data loss is occurring under these circumstances which is not ideal for the consistency/accuracy of record-keeping.As I am submitting this on behalf of an institution who has raised concern with this behaviour, they asked for confirmation of whether this is intended function, a bug or if so intended, recommend improvement to stop this from occurring.

Bearing in mind I am greener than green with coding logic, I have nonetheless tried to look at the coding for moodle-filter_embedquestion/classes/attempt.php and moodle-report_embedquestion/classes/attempt_storage.php in the respective Github repos to see if I can find any clues as to what happens with an attempt when you click "Start again". Looking here at line 438 I can see 'data-formchangechecker-non-submit' => 1]. This looks to me like an instruction being sent when users click Start again to change the database value for the prior attempt to flag it as non-submitted state until a new attempt submit resets that flag.

Looking here it looks like the embedded questions report is looking for specific context info to call a report for view. My guess is that the flag for a non-submitted state might preclude it as valid, therefore no data is returned in the report until something new is submitted. Step 9 above is likely due to the mention here that "All interactions with a question (Start, View, Submit) are logged"

Please feel free to ignore the last two paragraphs should they be completely irrelevant. Chalk it up to amateur ignorance, but I would appreciate some programatic understanding of why this might be occurring if you can spare the time to summarise.

TIA for looking into this.

@timhunt
Copy link
Member

timhunt commented Oct 1, 2021

classes/attempt_storage.php is the place to look, but I am afraid the rest of the analysis is wrong.

I think that the attempts are all stored, it is just that the report is now showing them. I think the way it is supposed to work is that the main report just shows the most recent attept at each questions, and then there is a link to drill down to see more details. However, it is a while since I looked at this code closely, so I might be wrong, and it might not be working properly.

@oucnelson
Copy link

Hello Alex,

Thank you for raising this; however please note that the main table column header is "Latest attempt status" (my emphasis). So if the student completes an attempt and then restarts the question with a new attempt, the data will change if a teacher is stalking watching a student in real-time :-) I had my staff view in Chrome, and was signed in using my student account in Firefox.

For confirmation, here is a screenshot of the report columns (OU theme):
report01

I did raise a related improvement awhile ago, in that we need an "Attempt in progress" state (which currently doesn't exist). However, that hasn't got high enough up our 'to do' list.

You'll see the students' full history if you click on the attempt date/time in the "Latest attempt" (OU theme):

report02

@alexanderwilliams091
Copy link
Author

Chris and Tim thanks for the detailed responses and your time testing/responding to this. Much appreciated. I am happy to explain this away as current intended function pending future improvements.

Cheers,
Alex

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

3 participants