diff --git a/classes/combinator_grader_outcome.php b/classes/combinator_grader_outcome.php index 09618e42..76a54dbe 100644 --- a/classes/combinator_grader_outcome.php +++ b/classes/combinator_grader_outcome.php @@ -250,7 +250,7 @@ private function format_first_failing_test($correctcol) { $n = count($row); for ($i = 0; $i < $n; $i++) { if ($headerrow[$i] != 'iscorrect') { - $cell = htmlspecialchars($row[$i]); + $cell = htmlspecialchars($row[$i], ENT_COMPAT | ENT_HTML401); $error .= "{$headerrow[$i]}:
$cell
"; } } diff --git a/edit_coderunner_form.php b/edit_coderunner_form.php index 0303452c..2a0a930a 100644 --- a/edit_coderunner_form.php +++ b/edit_coderunner_form.php @@ -548,10 +548,8 @@ public function data_preprocessing($question) { $question->penaltyregime = get_config('qtype_coderunner', 'default_penalty_regime'); } - foreach ( - ['datafiles' => 'datafile', - 'sampleanswerattachments' => 'samplefile'] as $fileset => $filearea - ) { + $filesets = ['datafiles' => 'datafile', 'sampleanswerattachments' => 'samplefile']; + foreach ($filesets as $fileset => $filearea) { $draftid = file_get_submitted_draft_itemid($fileset); $options = $this->fileoptions; $options['subdirs'] = false;