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:27 +08:00
parent 490e8f97e6
commit ba175bc7ac
+3 -1
View File
@@ -846,7 +846,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',
]);
}
}
}