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

This commit is contained in:
Paul Holden
2023-10-04 02:03:22 +02:00
committed by Jenkins
parent 1fd4ef9f2a
commit 21bc608466
+4 -2
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;