Error with submitting quizzes - regression caused by MDL-15542.

This commit is contained in:
tjhunt 2008-07-22 09:03:51 +00:00
parent b3fac92fdc
commit 5c98fcd402

View file

@ -81,7 +81,11 @@ if ($attemptobj->is_finished()) {
/// Don't log - we will end with a redirect to a page that is logged.
/// Get the list of questions needed by this page.
if (!empty($submittedquestionids)) {
$submittedquestionids = explode(',', $submittedquestionids);
} else {
$submittedquestionids = array();
}
if ($finishattempt) {
$questionids = $attemptobj->get_question_ids();
} else {
@ -90,7 +94,9 @@ if ($finishattempt) {
/// Load those questions we need, and just the submitted states for now.
$attemptobj->load_questions($questionids);
if (!empty($submittedquestionids)) {
$attemptobj->load_question_states($submittedquestionids);
}
/// Process the responses /////////////////////////////////////////////////
if (!$responses = data_submitted()) {