Posts made 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.
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Looking at this, it seems you have duplicated a subset of attempt.php, which is a reasonable way to cook up an addition like this. And the code looks reasonable on a quick reading.

Duplicated code like this will, of course, be a maintenance headache in future - but then we should come up with a proper solution for this whole issues in Moodle 2.0.

It would be useful to hear how you get on with these changes. Does it work flawlessly, or are there still subtleties that are not covered. Knowing whether your code works will be really helpful when I get around to adding this to Moodle 2.0.
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You seem to be on the right track. I assume you are attempting the quiz yourself using your web browser, then looking in the database to see what data Moodle created, and then making your script create the same sort of data.

That should work.

Have you also checked what is going on in the mdl_question_sessions table? You need to set the newest and newgraded columns.