mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 07:56:06 +02:00
Fix for bug 1527:
The New Event button is back in day view. Silly mistake, $USER wasn't taken from the globals and thus it always thought you weren't logged in.
This commit is contained in:
parent
1cbcc2c3d0
commit
b1bd2cf0c1
@ -183,7 +183,7 @@
|
||||
|
||||
|
||||
function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
|
||||
global $CFG, $THEME, $db;
|
||||
global $CFG, $THEME, $USER, $db;
|
||||
|
||||
if (!checkdate($m, $d, $y)) {
|
||||
$now = usergetdate(time());
|
||||
@ -200,7 +200,6 @@ function calendar_show_day($d, $m, $y, $courses, $groups, $users) {
|
||||
// New event button
|
||||
if (empty($USER) || isguest()) {
|
||||
$text = get_string('dayview', 'calendar').': '.calendar_course_filter_selector($getvars);
|
||||
|
||||
} else {
|
||||
$text = '<div style="float: left;">'.get_string('dayview', 'calendar').': '.
|
||||
calendar_course_filter_selector($getvars).'</div><div style="float: right;">';
|
||||
|
Loading…
x
Reference in New Issue
Block a user