Skip to content

Commit

Permalink
Fix codechecker errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AnupamaSarjoshi committed Oct 24, 2023
1 parent 88a2f0e commit 0efa243
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions questiontype.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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';
}
}
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 0efa243

Please sign in to comment.