Skip to content

Commit

Permalink
Merge branch 'MDL-50341' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Jun 1, 2015
2 parents 825be82 + 312dce0 commit df0a584
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion question/behaviour/behaviourbase.php
Original file line number Diff line number Diff line change
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 df0a584

Please sign in to comment.