mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Assignment MDL-22843
- allowed filearea 'response' to be served from uploadsingle assignment type. (fixed regression)
This commit is contained in:
parent
e417be4ca2
commit
289bcf7305
1 changed files with 3 additions and 3 deletions
|
@ -293,7 +293,7 @@ class assignment_uploadsingle extends assignment_base {
|
|||
|
||||
require_login($this->course, false, $this->cm);
|
||||
|
||||
if ($filearea !== 'submission') {
|
||||
if ($filearea !== 'submission' && $filearea !== 'response') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -306,9 +306,9 @@ class assignment_uploadsingle extends assignment_base {
|
|||
if ($USER->id != $submission->userid and !has_capability('mod/assignment:grade', $this->context)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$relativepath = implode('/', $args);
|
||||
$fullpath = '/'.$this->context->id.'/mod_assignment/submission/'.$submissionid.'/'.$relativepath;
|
||||
$fullpath = '/'.$this->context->id.'/mod_assignment/'.$filearea.'/'.$submissionid.'/'.$relativepath;
|
||||
|
||||
$fs = get_file_storage();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue