numbas / Numbas

A completely browser-based e-assessment/e-learning system, with an emphasis on mathematics
http://www.numbas.org.uk
Apache License 2.0
207 stars 122 forks source link

Offline analysis tool fails to match questions for diagnostic mode exams #1112

Open Lycanic opened 2 months ago

Lycanic commented 2 months ago

When using an encrypted file from a diagnostic mode exam, the offline analysis tool will consider it invalid as the ordering of the questions/groups are not as expected.

Extra context: The student's file stores questions in the order visited with blank entries for the remaining questions, whilst the exam definition stores all questions in a set order - it seems sequential exams respect that set order in their question storage, which was relied on in the table generation.

Lycanic commented 1 month ago

Follow-up:

It was expected that the question_group_order in the Scorm data would indicate the order of the shown question groups, however, in the case of diagnostic mode, both question_group_order and questionSubsets appear to be uncustomised and simply list the defined groups and subsets without respect to what was shown to the student.

I'm unsure if this is an issue with the saved data (that is, whether question_group_order should show the order that the student saw and it's a bug in the scorm data that it doesn't) or an impossible task (if the definition/generation of question_group_order doesn't allow the nebulous existence of any given question) - if the latter, then I need to adapt the attempt_grouped_questions function to support this difference/check for its presence, if the former, then it is a separate issue to be fixed but any data made before it is fixed will not work and may need a different method/external check anyway.

In essence, I think I need to update attempt_grouped_questions to double-check that the question groups line up (and re-do itself if not!) but there may also be an extra bug within the SCORM data for diagnostic tests.