MDL-79426 gradeimport_csv: safely preview CSV content during import.

This commit is contained in:
Paul Holden 2023-09-21 21:43:41 +01:00 committed by Jenkins
parent 04db4a3e54
commit 369c5407ab

View File

@ -67,8 +67,10 @@ class gradeimport_csv_renderer extends plugin_renderer_base {
$html = $this->output->heading(get_string('importpreview', 'grades'));
$table = new html_table();
$table->head = $header;
$table->data = $data;
$table->head = array_map('s', $header);
$table->data = array_map(static function($row) {
return array_map('s', $row);
}, $data);
$html .= html_writer::table($table);
return $html;