Skip to content

Commit

Permalink
Assignment MDL-22843
Browse files Browse the repository at this point in the history
 - allowed filearea 'response' to be served from uploadsingle assignment type. (fixed regression)
  • Loading branch information
aparup committed Jul 19, 2010
1 parent e417be4 commit 289bcf7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/assignment/type/uploadsingle/assignment.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function send_file($filearea, $args) {

require_login($this->course, false, $this->cm);

if ($filearea !== 'submission') {
if ($filearea !== 'submission' && $filearea !== 'response') {
return false;
}

Expand All @@ -306,9 +306,9 @@ function send_file($filearea, $args) {
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();

Expand Down

0 comments on commit 289bcf7

Please sign in to comment.