MDL-22630 adding missing path component into file download link

This commit is contained in:
Petr Skoda
2010-05-31 18:45:23 +00:00
parent d4dcfc6b8f
commit f1b8bcf70a
+2 -2
View File
@@ -272,7 +272,7 @@ function resource_get_coursemodule_info($coursemodule) {
return NULL;
}
// do not open any window because it would be left there after download
$path = '/'.$context->id.'/resource_content/'.$resource->revision.$mainfile->get_filename();
$path = '/'.$context->id.'/resource_content/'.$resource->revision.$mainfile->get_filepath().$mainfile->get_filename();
$fullurl = addslashes_js(file_encode_url($CFG->wwwroot.'/pluginfile.php', $path, true));
// When completion information is enabled for download files, make
@@ -309,7 +309,7 @@ function resource_get_file_areas($course, $cm, $context) {
}
/**
* File browsing support for resource module ontent area.
* File browsing support for resource module content area.
* @param object $browser
* @param object $areas
* @param object $course