Commit 41328834 authored by Dan Poltawski's avatar Dan Poltawski
Browse files

Merge branch 'MDL-50341_28' of git://github.com/timhunt/moodle into MOODLE_28_STABLE

parents 6e09b240 01b3b79a
......@@ -298,7 +298,12 @@ abstract class question_behaviour {
} else {
$stepswithsubmit = $this->qa->get_steps_with_submitted_response_iterator();
if ($whichtries == question_attempt::FIRST_TRY) {
return $this->question->classify_response($stepswithsubmit[1]->get_qt_data());
$firsttry = $stepswithsubmit[1];
if ($firsttry) {
return $this->question->classify_response($firsttry->get_qt_data());
} else {
return $this->question->classify_response(array());
}
} else {
$classifiedresponses = array();
foreach ($stepswithsubmit as $submittedresponseno => $step) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment