mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merged MDL-9606 from stable
This commit is contained in:
parent
1f21cc88f7
commit
ca42eec162
1 changed files with 3 additions and 1 deletions
|
@ -1239,7 +1239,9 @@ function calendar_get_default_courses($ignoreref = false) {
|
||||||
// find all course this student can view
|
// find all course this student can view
|
||||||
if ($allcourses = get_my_courses($USER->id, 'visible DESC, sortorder ASC', '*', true)) {
|
if ($allcourses = get_my_courses($USER->id, 'visible DESC, sortorder ASC', '*', true)) {
|
||||||
foreach ($allcourses as $courseid => $acourse) {
|
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
|
// let's try to see if there is any direct assignments on this context
|
||||||
// one can have multiple assignments
|
// one can have multiple assignments
|
||||||
// just use anyone that has something, or else use empty string
|
// just use anyone that has something, or else use empty string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue