]> git.mjollnir.org Git - moodle.git/commitdiff
Moved the require login and isteacher checks to infront of the form data processing
authormark-nielsen <mark-nielsen>
Sat, 29 Apr 2006 07:37:52 +0000 (07:37 +0000)
committermark-nielsen <mark-nielsen>
Sat, 29 Apr 2006 07:37:52 +0000 (07:37 +0000)
mod/lesson/report.php

index 43ed19737311374fe237ec62459c1276160a6025..7c8969531fcc042deeb13abcbd8452c612184cf9 100644 (file)
                                  ORDER BY u.lastname")) {
         $nothingtodisplay = true;
     }
+    
+// make sure people are where they should be
+    require_login($course->id, false);
+
+    if (!isteacher($course->id)) {
+        error("Must be teacher to view Reports");
+    }
 
 /// Process any form data before fetching attempts, grades and times
     if ($form = data_submitted()) {
         $times = array();
     }
 
-// make sure people are where they should be
-    require_login($course->id, false);
-
-    if (!isteacher($course->id)) {
-        error("Must be teacher to view Reports");
-    }
-
 /// Print the page header
     $strlessons = get_string('modulenameplural', 'lesson');