mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-57597 competency: Fix serving of prior learning evidence files
For security reasons, all files submitted by students must be disposed as attachments, not inline contents.
This commit is contained in:
parent
228637feff
commit
6f88c26864
1 changed files with 1 additions and 0 deletions
|
@ -290,6 +290,7 @@ function core_competency_pluginfile($course, $cm, $context, $filearea, $args, $f
|
||||||
if ($filearea == 'userevidence' && $context->contextlevel == CONTEXT_USER) {
|
if ($filearea == 'userevidence' && $context->contextlevel == CONTEXT_USER) {
|
||||||
if (user_evidence::can_read_user($context->instanceid)) {
|
if (user_evidence::can_read_user($context->instanceid)) {
|
||||||
$file = $fs->get_file($context->id, 'core_competency', $filearea, $itemid, $filepath, $filename);
|
$file = $fs->get_file($context->id, 'core_competency', $filearea, $itemid, $filepath, $filename);
|
||||||
|
$forcedownload = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue