Quiz broke- is there a way to fix this?

Quiz broke- is there a way to fix this?

от Wendy Harper -
Количество ответов: 7
I suspect that a student put a zero as an answer that was in a formulas question for the denominator resulting in a division by zero criteria checking.   I can not confirm this because I am unable to see the results of this quiz.    Temporarily,  I was able to make a new quiz, but, I need to access the grades from the original quiz.   I would appreciate any help in getting passed this error.   I would like to save the other students grades.
В ответ на Wendy Harper

Re: Quiz broke- is there a way to fix this?

от Tim Hunt -
Изображение пользователя Core developers Изображение пользователя Documentation writers Изображение пользователя Particularly helpful Moodlers Изображение пользователя Peer reviewers Изображение пользователя Plugin developers

I think your analysis of what is going on is probably right.

If you need a work-around, and you have direct access to the database, you could try fixing the data. Proceed at your own risk! You would need to start with something like

SELECT * FROM mdl_question_attempt_steps WHERE state = ''

(Or possible IS NULL, instead of = ''). If that finds data which seem to be related to this quiz attempt, then you could try changing the empty state value to 'gradedwrong' or something valid. That might recover the situation.

It is probably also the case that should handle this bad data better, or not let it be created in the first place. I created MDL-80127.

В ответ на Tim Hunt

Re: Quiz broke- is there a way to fix this?

от Wendy Harper -
Thank you Tim,   
I was able to recover the quiz for the other students.   This student's quiz was deleted.   
It is a formulas programming issue....   The student typed 0 for the input box that was for the denominator.  
in the grading criteria I had it checking
_0/_1 == num/den

For this question I changed it to _0 == num   && _1 == den
however, this will not work for other questions as I was giving partial credit for answers that were not reduced.
I will post in the forum for solutions to this programming issue.

I appreciate your attention to this issue, I imagine others may run into something similar.
Thank you for your help,
Wendy
В ответ на Wendy Harper

Это сообщение на форуме было удалено

Содержание этого сообщения на форуме было удалено и больше недоступно.
В ответ на Wendy Harper

Re: Quiz broke- is there a way to fix this?

от Matthias Giger -
Изображение пользователя Particularly helpful Moodlers
Don't know whether this will work, but you can try.

Change the grading criteria of the offending question and then regrade the quiz for all students.
For regrading you might need to use the url from another quiz and then replace the id in this url.
В ответ на Matthias Giger

Re: Quiz broke- is there a way to fix this?

от Wendy Harper -
How would I have the quiz grade the offending question based on the new question since it uses the question as programmed when the student begins the quiz attempt?
В ответ на Wendy Harper

Re: Quiz broke- is there a way to fix this?

от Matthias Giger -
Изображение пользователя Particularly helpful Moodlers
I don't know whether I quite understand your question, but that is how it could work:

Edit the offending grading criteria from n/d == _0/_1 to n*_1 == d*_0 so that there won't be an error in case a student enters a 0.

Once you have updated the question, then you regrade the attempts in quiz.

This should work as long as the question itself is set to use "always the latest" because even for attempts in progress a regrade forces the newest version to be used.

Does this answer the question?
Anyway, I've seen that you could solve the problem following an alternative approach.