mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Reading some code carefully...
This small check is already done a couple lines above.
This commit is contained in:
parent
647396597a
commit
55d9c93a11
@ -1107,7 +1107,7 @@ function calendar_get_default_courses($ignoreref = false) {
|
||||
}
|
||||
|
||||
$courses = array();
|
||||
if(!empty($USER->id) && isadmin($USER->id)) {
|
||||
if(isadmin($USER->id)) {
|
||||
if(!empty($CFG->calendar_adminseesall)) {
|
||||
$courses = get_records_sql('SELECT id, 1 FROM '.$CFG->prefix.'course');
|
||||
return $courses;
|
||||
|
Loading…
x
Reference in New Issue
Block a user