-
Notifications
You must be signed in to change notification settings - Fork 717
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
Question/quiz validation error #12149
Comments
That quiz with 107 questions can be considered "corrupted data". When saving the quiz during creation, the total number of questions for each section was added together. The first section was the default value, a number The base Exam data structure has a "num_questions" property so the quiz creator adds that same value for each section together to get the Exam's total sum of questions from all sections. So when that quiz was saved, I added the number I've fixed this problem by forcing the values to be numbers when adding them together. That all said, this is a problem that could be avoided by summing the questions when the user takes the quiz rather than relying on the vestigal total quiz questions count. That means -- when the Learner begins a quiz, code on their computer will count the questions. Basically, there isn't really any need for the Or, perhaps, the value of In any case -- there are definitely some improvements that we can apply here, but I think this is relatively low priority overall since it is only a bug in the case of corrupted data. |
I think dynamically summing the questions from all sections seems like the most sensible resolution here. |
This is a problem when we have a section but we dont have questions resources on that section. Compartir.pantalla.-.2024-05-15.13_33_36.mp4It keeps adding the 10 questions in the section even if there are not resources in it, and thats why learners cant complete the quiz. What should we do with the sections that do not have resources? I would think we should filter them out and not show them to students. |
Should we do it when saving the quiz? Or when reading it? I think it would be better to do it on save, and have |
We currently are doing this when we save the quiz. The idea is that in Learn, when the user goes to take the exam, that is when we just count all of the questions in I think this is fine - but I wonder if perhaps it'd be better to implement an on-save validator on the Exam class that basically serves as the "One validation to rule them all" which can return an error when the Exam.question_count value doesn't match the number of questions in the sections total. Overall I think it'd be better to utilize the Exam model and handle this logic in one place. It feels to me that if we just say "we'll code it client-side to derive the value of |
Originally posted by @radinamatic in #12111 (comment)
This seems like it may be either a validation problem or an error handling problem at some step along the quiz or assessment process. This needs some further exploration to determine if the quiz had an invalid question (and how to prevent such edge cases) or, if there is something wrong with advancing through the quiz on the learner side. Or possibly something else.
The text was updated successfully, but these errors were encountered: