Skip to content

Commit 15f42c2

Browse files
committed
Code tidying
1 parent 7c1be89 commit 15f42c2

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

classes/combinator_grader_outcome.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ private function format_first_failing_test($correctcol) {
250250
$n = count($row);
251251
for ($i = 0; $i < $n; $i++) {
252252
if ($headerrow[$i] != 'iscorrect') {
253-
$cell = htmlspecialchars($row[$i]);
253+
$cell = htmlspecialchars($row[$i], ENT_COMPAT | ENT_HTML401);
254254
$error .= "{$headerrow[$i]}: <pre>$cell</pre>";
255255
}
256256
}

edit_coderunner_form.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,8 @@ public function data_preprocessing($question) {
548548
$question->penaltyregime = get_config('qtype_coderunner', 'default_penalty_regime');
549549
}
550550

551-
foreach (
552-
['datafiles' => 'datafile',
553-
'sampleanswerattachments' => 'samplefile'] as $fileset => $filearea
554-
) {
551+
$filesets = ['datafiles' => 'datafile', 'sampleanswerattachments' => 'samplefile'];
552+
foreach ($filesets as $fileset => $filearea) {
555553
$draftid = file_get_submitted_draft_itemid($fileset);
556554
$options = $this->fileoptions;
557555
$options['subdirs'] = false;

0 commit comments

Comments
 (0)