Permalink
Browse files

MDL-34226 multichoice qtype: correct is_complete_response for multian…

…swer

The multianswer qtype uses the multi-choice one, and the way it does its
responses array breaks an assumption that multi-choice was making.
  • Loading branch information...
1 parent 947ba9c commit db5b519022330fdf813f027d3b29ff89cb1b183a @timhunt timhunt committed Jul 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/multichoice/question.php
@@ -199,7 +199,7 @@ public function is_same_response(array $prevresponse, array $newresponse) {
}
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) {

0 comments on commit db5b519

Please sign in to comment.