mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Use caching if necessary, so that teachers can't lock themselves out
accidentally during the current session.
This commit is contained in:
parent
d92a53d182
commit
ff20ee79f6
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user