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');