Skip to content

Commit

Permalink
Merge branch 'MDL-50341_29' of git://github.com/timhunt/moodle into M…
Browse files Browse the repository at this point in the history
…OODLE_29_STABLE
  • Loading branch information
danpoltawski committed Jun 1, 2015
2 parents 3372a99 + 71b448e commit f0a7bbc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion question/behaviour/behaviourbase.php
Expand Up @@ -308,7 +308,12 @@ public function classify_response($whichtries = question_attempt::LAST_TRY) {
} 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) {
Expand Down

0 comments on commit f0a7bbc

Please sign in to comment.