Use caching if necessary, so that teachers can't lock themselves out

accidentally during the current session.
This commit is contained in:
moodler 2003-02-26 05:58:44 +00:00
parent d92a53d182
commit ff20ee79f6

View File

@ -76,7 +76,7 @@
/// Add a teacher if one is specified
if (!empty($add)) {
if (!isteacher($course->id, $USER->id)){
if (!isteacher($course->id)){
error("You must be an administrator or teacher to modify this course.");
}
@ -110,7 +110,7 @@
if (!empty($remove)) {
if (!isteacher($course->id, $USER->id)){
if (!isteacher($course->id)){
error("You must be an administrator or teacher to modify this course.");
}
if (! $user = get_record("user", "id", $remove)) {