MDL-54113 assign: Open files in new window

Open files in a new window when viewing to ensure that the form change
checker does not warn about the page reloading.
This commit is contained in:
Andrew Nicols
2016-08-24 11:34:21 +08:00
parent e90dfb32ae
commit b6e3abd875
+3 -1
View File
@@ -935,7 +935,9 @@ class assign_files implements renderable {
$file->get_filename();
$url = file_encode_url("$CFG->wwwroot/pluginfile.php", $path, true);
$filename = $file->get_filename();
$file->fileurl = html_writer::link($url, $filename);
$file->fileurl = html_writer::link($url, $filename, [
'target' => '_blank',
]);
}
}
}