Skip to content

Commit

Permalink
Code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
trampgeek committed May 13, 2024
1 parent 7c1be89 commit 15f42c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/combinator_grader_outcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]}: <pre>$cell</pre>";
}
}
Expand Down
6 changes: 2 additions & 4 deletions edit_coderunner_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 15f42c2

Please sign in to comment.