mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
Behavior change, according to Gustav's remarks on the forums. Events from
courses other than the one you are browsing are not displayed in the month views or as upcoming events, except only if you explicitly do it in the full month view. However, if you manually go to a day with such an event and get a day view, you will see the event. Should I find a way to hide that too?
This commit is contained in:
parent
1bb9d624c4
commit
9ff136e503
2 changed files with 17 additions and 10 deletions
|
@ -1145,8 +1145,12 @@ function calendar_edit_event_allowed($event) {
|
|||
return false;
|
||||
}
|
||||
|
||||
function calendar_get_default_courses() {
|
||||
global $USER, $CFG;
|
||||
function calendar_get_default_courses($overridereferer = true) {
|
||||
global $USER, $CFG, $SESSION;
|
||||
|
||||
if(!empty($SESSION->cal_course_referer) && $overridereferer) {
|
||||
return array($SESSION->cal_course_referer => 1);
|
||||
}
|
||||
|
||||
$courses = array();
|
||||
if(isadmin($USER->id)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue