-
-
Notifications
You must be signed in to change notification settings - Fork 165
-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Multi-part answers are not properly stored in Gateway Quizzes #924
Comments
drgrice1
added a commit
to drgrice1/webwork2
that referenced
this issue
Apr 25, 2019
If a problem uses an extended response group for its answers (like multianswers with the single result option, answer arrays, or mathquill answers) and a quiz has multiple pages, then the extended answers are lost every time the page is changed. The intended result is that the quiz would create a hidden input for every given answer that is not on the current page. It detects these answers by looking for the quiz prefix in the input names. However, it was previously assumed that the quiz prefix would be at the beginning of the input name, which is incorrect. Extended response group answers add a prefix in front of the the quiz prefix. This fixes the problem by finding all inputs that contain the quiz prefix, but excludes the previous answer inputs. This fixes issue openwebwork#924.
I believe that http://webwork.maa.org/moodle/mod/forum/discuss.php?d=4598 (matrix answers disappearing) is probably related as well. |
mgage
pushed a commit
to mgage/webwork2
that referenced
this issue
May 10, 2019
If a problem uses an extended response group for its answers (like multianswers with the single result option, answer arrays, or mathquill answers) and a quiz has multiple pages, then the extended answers are lost every time the page is changed. The intended result is that the quiz would create a hidden input for every given answer that is not on the current page. It detects these answers by looking for the quiz prefix in the input names. However, it was previously assumed that the quiz prefix would be at the beginning of the input name, which is incorrect. Extended response group answers add a prefix in front of the the quiz prefix. This fixes the problem by finding all inputs that contain the quiz prefix, but excludes the previous answer inputs. This fixes issue openwebwork#924.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce:
Create a gateway quiz which includes a question that uses ans_array on a MathObject. Enter an answer, then either preview, submit, or change pages (for multipage quizzes) in the quiz. Both the last_answer field and the past_answers table will only contain the first element of the matrix.
See http://webwork.maa.org/moodle/mod/forum/discuss.php?d=4549 for a MWE
It looks like this was fixed in homework mode (Problem.pm) with the creation of the process_and_log_answer function in ProblemUtil.pm, but the Gateway code was never updated to use this function. Gateway code should probably be refactored to use the same function, but Gateways also store the type of submission (e.g. [submit], [preview] or [newpage]), so this would have to be considered, as well as testing the loading of past answers into answer blanks.
The text was updated successfully, but these errors were encountered: