diff --git a/question/type/multichoice/db/upgradelib.php b/question/type/multichoice/db/upgradelib.php index 7a197b1bbf766..0b9b2e7bcf0a0 100644 --- a/question/type/multichoice/db/upgradelib.php +++ b/question/type/multichoice/db/upgradelib.php @@ -41,7 +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 - return empty($state->answer) || substr($a, -1) == ':'; + return empty($state->answer) || substr($state->answer, -1) == ':'; } public function right_answer() {