Browse files

Avoid a warning when displaying multichoice quiz questions

  • Loading branch information...
1 parent f2179d4 commit c3a70f83b181e1186be903dab1c41e7fa30f9ea5 mjollnir_ committed Aug 31, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/quiz/questiontypes/multichoice/questiontype.php
View
2 mod/quiz/questiontypes/multichoice/questiontype.php
@@ -295,7 +295,7 @@ function print_question_formulation_and_controls(&$question, &$state, $quiz, $op
// the single selection case or has a positive score in the multiple
// selection case
if ($options->readonly && $options->correct_responses &&
- in_array($aid, $correctanswers)) {
+ is_array($correctanswers) && in_array($aid, $correctanswers)) {
echo '<td valign="top" class="highlight"><label for="'.$id.'">'.
format_text("$qnumchar. $answer->answer", FORMAT_MOODLE ,
$formatoptions) . '</label></td>';

0 comments on commit c3a70f8

Please sign in to comment.