diff --git a/questiontype.php b/questiontype.php index 31fc1e8..3051f91 100644 --- a/questiontype.php +++ b/questiontype.php @@ -152,7 +152,7 @@ public function save_rows(stdClass $question, array $columnslist) { $answerslist[] = $c + 1; } } - $questionrow->correctanswers = implode(',',$answerslist); + $questionrow->correctanswers = implode(',', $answerslist); $questionrow->feedback = $question->feedback[$i]['text']; $questionrow->feedbackformat = FORMAT_HTML; $questionrow->id = $DB->insert_record('qtype_oumatrix_rows', $questionrow); @@ -225,7 +225,7 @@ protected function initialise_question_rows(question_definition $question, stdCl $anslabel = 'a' . $column->number; $correctanswers[$column->number] = $anslabel; } else { - $correctanswers[$column->number] = '1'; + $correctanswers[$column->number] = '1'; } } } @@ -288,7 +288,7 @@ public function get_total_number_of_choices(object $questiondata):? int { public function get_num_correct_choices($questiondata) { $numright = 0; foreach ($questiondata->rows as $row) { - $numright += count((array)$row->correctanswers); + $numright += count((array)$row->correctanswers); } return $numright; }