mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Fix for bug 1442
- notices - course is now properly passed to calendar_filter_controls from block
This commit is contained in:
parent
d980b5da22
commit
3cb9ee3949
2 changed files with 12 additions and 11 deletions
|
@ -559,10 +559,11 @@ function calendar_top_controls($type, $data) {
|
|||
return $content;
|
||||
}
|
||||
|
||||
function calendar_filter_controls($type, $vars = NULL) {
|
||||
function calendar_filter_controls($type, $vars = NULL, $course = NULL) {
|
||||
global $CFG, $SESSION, $USER;
|
||||
|
||||
$groupevents = true;
|
||||
$getvars = '';
|
||||
|
||||
switch($type) {
|
||||
case 'upcoming':
|
||||
|
@ -573,13 +574,13 @@ function calendar_filter_controls($type, $vars = NULL) {
|
|||
break;
|
||||
case 'course':
|
||||
$getvars = '&from=course&id='.$_GET['id'];
|
||||
if($course->groupmode == NOGROUPS && $course->groupmodeforce) {
|
||||
if (isset($course->groupmode) and !$course->groupmode and $course->groupmodeforce) {
|
||||
$groupevents = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if(!empty($vars)) {
|
||||
if (!empty($vars)) {
|
||||
$getvars .= '&'.$vars;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue