Skip to content

Commit

Permalink
MDL-34226 multichoice qtype: correct is_complete_response for multian…
Browse files Browse the repository at this point in the history
…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
timhunt committed Jul 19, 2012
1 parent 9592f5d commit 0656c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion question/type/multichoice/question.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 0656c0a

Please sign in to comment.