mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Moved the require login and isteacher checks to infront of the form data processing
This commit is contained in:
parent
6cd88ca593
commit
be1af5b770
@ -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');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user