Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed hardcoded filepath. Bug #4544.

  • Loading branch information...
commit 35c808396adb6e20940c1be555998bc8e167a5a0 1 parent 2efe76b
authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  mod/quiz/export.php
5  mod/quiz/export.php
@@ -32,6 +32,7 @@
32 32
 
33 33
     $strexportquestions = get_string("exportquestions", "quiz");
34 34
     $strquestions = get_string("questions", "quiz");
  35
+    $strexportfilename = get_string('exportfilename','quiz');
35 36
 
36 37
     $strquizzes = get_string('modulenameplural', 'quiz');
37 38
     $streditingquiz = get_string(isset($SESSION->modform->instance) ? "editingquiz" : "editquestions", "quiz");
@@ -78,10 +79,10 @@
78 79
         $download_str = get_string( 'download', 'quiz' );
79 80
         $downloadextra_str = get_string( 'downloadextra','quiz' );
80 81
         if ($CFG->slasharguments) {
81  
-          $efile = "{$CFG->wwwroot}/file.php/$course->id/quiz/$exportfilename".$file_ext;
  82
+          $efile = "{$CFG->wwwroot}/file.php/$course->id/$strexportfilename/$exportfilename".$file_ext;
82 83
         }
83 84
         else {
84  
-          $efile = "{$CFG->wwwroot}/file.php?file=/$course->id/quiz/$exportfilename".$file_ext;
  85
+          $efile = "{$CFG->wwwroot}/file.php?file=/$course->id/$strexportfilename/$exportfilename".$file_ext;
85 86
         }
86 87
         echo "</p><center><a href=\"$efile\">$download_str</a></center></p>";
87 88
         echo "</p><center><font size=\"-1\">$downloadextra_str</font></center></p>";

0 notes on commit 35c8083

Please sign in to comment.
Something went wrong with that request. Please try again.