]> git.mjollnir.org Git - moodle.git/commitdiff
workshop: fixed link to the attachment in a folder
authorDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 18:22:58 +0000 (18:22 +0000)
committerDavid Mudrak <david.mudrak@gmail.com>
Mon, 4 Jan 2010 18:22:58 +0000 (18:22 +0000)
mod/workshop/renderer.php

index d282336206c7d200983c5326c9b60abbabeff058..43be8cf14845a83b214d97cd19d20f14edad158c 100644 (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();