timhunt / moodle-quizaccess_offlinemode

A Moodle plugin to allow, as far as possible, a student to continue working on a deferred-feedback quiz attempt even if the network connection goes down.
5 stars 4 forks source link

Fatal error while displaying a new quiz #4

Closed nadavkav closed 9 years ago

nadavkav commented 9 years ago

After creating a new Quiz with a few basic core MC questions and trying to start a new attempt, I am getting the following fatal error. I do not have this issue on old quizzes just on new ones.

Debug info: Argument 3 passed to quiz_attempt::render_question() must be an instance of mod_quiz_renderer, instance of moodle_url given, called in [dirroot]/mod/quiz/accessrule/offlinemode/attempt.php on line 179 and defined Error code: codingerror Stack trace: line 393 of /lib/setuplib.php: coding_exception thrown line 1434 of /mod/quiz/attemptlib.php: call to default_error_handler() line 179 of /mod/quiz/accessrule/offlinemode/attempt.php: call to quiz_attempt->render_question()

Adding what seems like a missing "$output" quiz renderer as 3rd param to $attemptobj->render_question() line 178 seems to fix this issue. Please verify :-)

timhunt commented 9 years ago

Thanks Nadav. I know this plugin is not currently compatible with Moodle 2.9. The OU will be starting the migration to 2.9 soon, and so I will test your fix and merge it in the next few weeks.

nadavkav commented 9 years ago

Groovy :-)

timhunt commented 9 years ago

There are other fixes required, which I will make soon, but this is a step in the right direction.

timhunt commented 9 years ago

Oops! also, you need a , after the added variable!

nadavkav commented 9 years ago

Oups, I was adding the patch directly in github editor and not using my forked fixed branch. Sorry for the missing ","

Looking forward to see all the other important fixes :-)