mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
Merged MDL-9606 from stable
This commit is contained in:
parent
1f21cc88f7
commit
ca42eec162
@ -1239,7 +1239,9 @@ function calendar_get_default_courses($ignoreref = false) {
|
||||
// find all course this student can view
|
||||
if ($allcourses = get_my_courses($USER->id, 'visible DESC, sortorder ASC', '*', true)) {
|
||||
foreach ($allcourses as $courseid => $acourse) {
|
||||
$context = get_context_instance(CONTEXT_COURSE, $courseid);
|
||||
if (!$context = get_context_instance(CONTEXT_COURSE, $courseid)) {
|
||||
continue;
|
||||
}
|
||||
// let's try to see if there is any direct assignments on this context
|
||||
// one can have multiple assignments
|
||||
// just use anyone that has something, or else use empty string
|
||||
|
Loading…
x
Reference in New Issue
Block a user