Closed skrede closed 6 years ago
Sorry. This crashes when the student tries to do the Quiz.
Exception - Call to a member function next_question_for_user() on null
More information about this error Debug info: Error code: generalexceptionmessage Stack trace:
line 102 of /mod/capquiz/classes/capquiz_question_engine.php: Error thrown
line 94 of /mod/capquiz/classes/capquiz_question_engine.php: call to mod_capquiz\capquiz_question_engine->find_question_for_user()
line 54 of /mod/capquiz/classes/capquiz_question_engine.php: call to mod_capquiz\capquiz_question_engine->new_attempt_for_user()
line 49 of /mod/capquiz/classes/output/question_attempt_renderer.php: call to mod_capquiz\capquiz_question_engine->attempt_for_user()
line 97 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\question_attempt_renderer->render()
line 112 of /mod/capquiz/classes/output/renderer.php: call to mod_capquiz\output\renderer->display_view()
line 48 of /mod/capquiz/view.php: call to mod_capquiz\output\renderer->display_question_attempt_view()
That is weird, the famous: "it works on my machine"
There is a difference. It works if you assign a question list from template. It doesn't work if you create a new one. Fix incoming.
Set default matchmaking strategy and default rating system when assigning question list to capquiz if no matchmaking strategy or rating system is specified.
Default matchmaking strategy and rating system is implicitly specified as being the first in the list of available strategies and systems.
Remove unused function capquiz() in lib.php.
Remove unused rendering functions in renderer as a result of refactoring.
Solves #71