workshop: fixed link to the attachment in a folder

This commit is contained in:
David Mudrak 2010-01-04 18:22:58 +00:00
parent d183140de8
commit aa6610f31b

View File

@ -262,9 +262,10 @@ class moodle_mod_workshop_renderer extends moodle_renderer_base {
continue;
}
$filepath = $file->get_filepath();
$filename = $file->get_filename();
$fileurl = file_encode_url($CFG->wwwroot . '/pluginfile.php',
'/' . $ctx->id . '/workshop_submission_attachment/' . $submission->id . '/' . $filename, true);
'/' . $ctx->id . '/workshop_submission_attachment/' . $submission->id . $filepath . $filename, true);
$type = $file->get_mimetype();
$type = mimeinfo_from_type("type", $type);
$icon = new html_image();