mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Error with submitting quizzes - regression caused by MDL-15542.
This commit is contained in:
parent
b3fac92fdc
commit
5c98fcd402
1 changed files with 8 additions and 2 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue