]> git.mjollnir.org Git - moodle.git/commitdiff
course/grades.php is using sesskey.
authorstronk7 <stronk7>
Sat, 9 Oct 2004 11:37:48 +0000 (11:37 +0000)
committerstronk7 <stronk7>
Sat, 9 Oct 2004 11:37:48 +0000 (11:37 +0000)
Merged from MOODLE_14_STABLE

course/grades.php

index 9775df6e8d046e41b7372049a126b06245f5a74d..487cad9040266d2e7d48b084ee2b42cdcd69cb25 100644 (file)
 
 
 /// OK, we have all the data, now present it to the user
-    if ($download == "xls") {
+    if ($download == "xls" and confirm_sesskey()) {
         require_once("../lib/excel/Worksheet.php");
         require_once("../lib/excel/Workbook.php");
 
     
         exit;
 
-    } else if ($download == "txt") {
+    } else if ($download == "txt" and confirm_sesskey()) {
 
 /// Print header to force download
 
         echo "<td>";
         $options["id"] = "$course->id";
         $options["download"] = "xls";
+        $options["sesskey"] = $USER->sesskey;
         print_single_button("grades.php", $options, get_string("downloadexcel"));
         echo "<td>";
         $options["download"] = "txt";
+        $options["sesskey"] = $USER->sesskey;
         print_single_button("grades.php", $options, get_string("downloadtext"));
         echo "</table>";