Browse files

MDL-37972 Assignment: fixing settings link for upload single submissions

  • Loading branch information...
1 parent 98f4a31 commit bf139ab2c2dc5f87d74803868730531496296b63 @sam-moodle sam-moodle committed with jsnfwlr Dec 10, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/assignment/type/uploadsingle/assignment.class.php
View
2 mod/assignment/type/uploadsingle/assignment.class.php
@@ -379,7 +379,7 @@ function extend_settings_navigation($node) {
foreach ($files as $file) {
$filename = $file->get_filename();
$mimetype = $file->get_mimetype();
- $link = file_encode_url($CFG->wwwroot.'/pluginfile.php', '/'.$this->context->id.'/mod_assignment', 'submission/'.$submission->id.'/'.$filename);
+ $link = moodle_url::make_pluginfile_url($this->context->id, 'mod_assignment', 'submission', $submission->id, $file->get_filepath(), $filename);
$filenode->add($filename, $link, navigation_node::TYPE_SETTING, null, null, new pix_icon(file_file_icon($file), ''));
}
}

0 comments on commit bf139ab

Please sign in to comment.