Assignment MDL-22843

- allowed filearea 'response' to be served from uploadsingle assignment type. (fixed regression)
This commit is contained in:
aparup 2010-07-19 08:22:56 +00:00
parent e417be4ca2
commit 289bcf7305

View file

@ -293,7 +293,7 @@ class assignment_uploadsingle extends assignment_base {
require_login($this->course, false, $this->cm); require_login($this->course, false, $this->cm);
if ($filearea !== 'submission') { if ($filearea !== 'submission' && $filearea !== 'response') {
return false; return false;
} }
@ -308,7 +308,7 @@ class assignment_uploadsingle extends assignment_base {
} }
$relativepath = implode('/', $args); $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(); $fs = get_file_storage();