Browse files

Moved the require login and isteacher checks to infront of the form d…

…ata processing
  • Loading branch information...
1 parent 6cd88ca commit be1af5b770fa1f053e51c9d292edcc450bf0f02c mark-nielsen committed Apr 29, 2006
Showing with 7 additions and 7 deletions.
  1. +7 −7 mod/lesson/report.php
View
14 mod/lesson/report.php
@@ -32,6 +32,13 @@
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()) {
@@ -90,13 +97,6 @@
$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');

0 comments on commit be1af5b

Please sign in to comment.