Quiz Regrade stops in the middle?

Quiz Regrade stops in the middle?

by Jeffrey Thomas -
Number of replies: 9

With a recent quiz, with only 64 attempts, I found an error in one of the answergrades -- I edited the question to correct the answer-grade, then tried running the Regrade function: http://wsmoodle/mod/quiz/report.php?q=56&mode=regrade

It runs fine for a few questions, regrading approximately 1 question per minute, then simply fails, returning an IE 500 message,

Internet Explorer cannot display the webpage

The quiz appears to be uncorrupted, and I can re-run the Regrade function.  The first time it caught a few responses that were regraded, they displayed as hyperlinks; but then in subsequent runs of the function, they did not show as hyperlinks (properly so, I suppose).   And yet, it will not run past 8 questions -- there are 19 total questions.

Perhaps there is some maximum-time or memory setting that we are reaching?   64 attempts x 19 questions, that's all! 

We are running v1.9.2+, mySQL5, otherwise vanilla installation on IIS/Windows, with browser=IE7.0

Average of ratings: -
In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Tony Ruggiero -
did you get a response on this one?

I have a much larger number of attempts and it seems that the regrade times out.
In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Jeffrey Thomas -
This issue is not resolved; no response to my earlier plaintive query, and it reared its ugly head again today, when I corrected my error in a quiz and tried to regrade. http://wsmoodle/mod/quiz/report.php?q=52&mode=regrade    runs for a few questions, regrading properly, then suddenly displays the IE500 error-page.  (I cannot even see which questions successfully regraded!)    There is evidently some system-memory-setting or MySQL-setting that needs to be tweaked?   Any clues, please?
In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
There is a setting that should be tweaked, and we are already tweaking it correctly. In the inner loop in the regrade report we are calling set_time_limit. That should be sufficient. It is really weird that the 500 error is overwriting the stuff that was already output. That is a real pain! Actually, I think there is a setting in IE to stop it doing that.
In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Jeffrey Thomas -
Latest recurrence of this problem:  same behavior on first run of Quiz=55, but after I refresh the screen to force another regrade, the displays stops in the seventh question and displays Regrading "Random Question (Programming languages)". Attempts: #2689 #2688 #2691 #2690 #2692 #2693 #2695 #2696
Can not find wrapped question Hyper Text Markup Language
Wrapped state missing

Curious message!  Any suggestions please?

We are running Moodle1.9.2+, on our internal MySQL5 db.

In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Chris Potter -
Did you have a student complain about this message as well? I've found an inconsistency in my database where this error can occur, but my students get it as well... quite rare, quite odd, and quite random. It is unsolved in my situation so far. I'm running Moodle 1.8.7+. Did you happen to upgrade from 1.8 or was this a fresh install with no previous data? We were hoping that an upgrade might help this situation, but alas, it doesn't appear so.
In reply to Chris Potter

Re: Quiz Regrade stops in the middle?

by Jeffrey Thomas -

I have never seen nor heard anyone report that Wrapped state missing message before, and we have been using Moodle for 3 years, since v1.6.  Yes, we upgraded from 1.8 last July, to v1.9.2+ ... I want to upgrade again over the winter holidays, in hopes of enjoying new patches and features and maybe allowing me to run Quiz Regrade to completion.  That's when our part-time sysadmin goes back to graduate school, so I will have to get much more familiar with Moodle internals. 

I am still puzzled as to the cause of the original problem, and even more puzzled by the strange new error message.  I would appreciate some suggestions.

In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Chris Potter -
I've found it relating to random questions in quizzes (actually Tim Hunt suggested this and I have verified that). I stumbled across some documentation on things to do to ensure your questions are all "consistent":

http://docs.moodle.org/en/Development:Question_bank_consistency_check

Perhaps that can provide some insight for you. It doesn't hurt to run the selects. As the documentation says, they should return zero. Ours returned 1741 (we've been having the issue for a while on very rare occasions). I haven't applied the same "fix" as they suggest to our "live" data yet, as I'm still testing it on a development set up. It might be worth doing the same and seeing if it fixes your problem. Good luck and if you find a solution, PLEASE post back.
In reply to Chris Potter

Re: Quiz Regrade stops in the middle?

by Dániel Füleki -
I could reproduce this problem by accidentally deleting the "random[qqqq]-" prefix from a mdl_question_state.answer field, leaving an answer solely. Thus, if a random question is being scored, an identifier is placed ('wrapped') in front of the answer given to identify WHICH question was it from the question bank.

The error re-appears when a randomized question's code does not fit any identifier in the question bank. (Id mismatches are probably soft (non-fatal) errors - with the meaning like having given a completely erratic answer to a question, resulting in no points for that question.)
In reply to Jeffrey Thomas

Re: Quiz Regrade stops in the middle?

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers

This thread started a while ago... but for anybody experiencing the same problem this worked for us:

The cause could be that PHP is "timing out".
The solution is to increase the value of the max_execution_time variable in your php.ini file.