Skip to content

Commit

Permalink
Merge branch 'MDL-28684' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Aug 24, 2011
2 parents a3f2ad4 + 4ca3f2d commit f04da0f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions question/type/multichoice/db/upgradelib.php
Expand Up @@ -41,9 +41,7 @@ class qtype_multichoice_qe2_attempt_updater extends question_qtype_attempt_updat

public function is_blank_answer($state) {
// blank multichoice answers are not empty strings, they rather end in a colon
$a = $state->answer;
$empty = (substr($a, strlen($a) - 1) == ':');
return $empty;
return empty($state->answer) || substr($a, -1) == ':';
}

public function right_answer() {
Expand Down

0 comments on commit f04da0f

Please sign in to comment.