mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
"MDL-14460,fix get_context_instance, merged from MOODLE_19_STABLE"
This commit is contained in:
parent
33aa5723ca
commit
d9d16e56a3
5 changed files with 9 additions and 9 deletions
|
@ -1416,7 +1416,7 @@ function calendar_get_default_courses($ignoreref = false) {
|
|||
}
|
||||
|
||||
$courses = array();
|
||||
if (has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM, SITEID))) {
|
||||
if (has_capability('moodle/calendar:manageentries', get_context_instance(CONTEXT_SYSTEM))) {
|
||||
if (!empty($CFG->calendar_adminseesall)) {
|
||||
$courses = get_records_sql('SELECT id, 1 FROM '.$CFG->prefix.'course');
|
||||
return $courses;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue