From c0a912e5acbd0d25118b9c8a7d8cc5da5a237b65 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Mon, 16 Jul 2012 14:30:12 +0100 Subject: [PATCH] MDL-34226 multichoice qtype: correct is_complete_response for multianswer The multianswer qtype uses the multi-choice one, and the way it does its responses array breaks an assumption that multi-choice was making. --- question/type/multichoice/question.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/multichoice/question.php b/question/type/multichoice/question.php index f31ceb6e443..afca6a47740 100644 --- a/question/type/multichoice/question.php +++ b/question/type/multichoice/question.php @@ -199,7 +199,7 @@ class qtype_multichoice_single_question extends qtype_multichoice_base { } public function is_complete_response(array $response) { - return array_key_exists('answer', $response); + return array_key_exists('answer', $response) && $response['answer'] !== ''; } public function is_gradable_response(array $response) {