mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
MDL-12075 Display individually colour-coded events in calendar rather than random day colours
This commit is contained in:
parent
21090e447a
commit
9b50bd46ad
@ -1049,7 +1049,7 @@ function calendar_events_by_day($events, $month, $year, &$eventsbyday, &$duratio
|
||||
else if($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) {
|
||||
$typesbyday[$eventdaystart]['startcourse'] = true;
|
||||
// Set event class for course event
|
||||
//$events[$event->id]->class = 'event_course';
|
||||
$events[$event->id]->class = 'event_course';
|
||||
}
|
||||
else if($event->groupid) {
|
||||
$typesbyday[$eventdaystart]['startgroup'] = true;
|
||||
|
@ -447,15 +447,6 @@ function calendar_show_month_detailed($m, $y, $courses, $groups, $users, $course
|
||||
|
||||
// Special visual fx if an event is defined
|
||||
if(isset($eventsbyday[$day])) {
|
||||
if(isset($typesbyday[$day]['startglobal'])) {
|
||||
$class .= ' event_global';
|
||||
} else if(isset($typesbyday[$day]['startcourse'])) {
|
||||
$class .= ' event_course';
|
||||
} else if(isset($typesbyday[$day]['startgroup'])) {
|
||||
$class .= ' event_group';
|
||||
} else if(isset($typesbyday[$day]['startuser'])) {
|
||||
$class .= ' event_user';
|
||||
}
|
||||
if(count($eventsbyday[$day]) == 1) {
|
||||
$title = get_string('oneevent', 'calendar');
|
||||
}
|
||||
|
@ -180,6 +180,17 @@ table.minicalendar td {
|
||||
-moz-border-radius:4px;
|
||||
}
|
||||
|
||||
#calendar .maincalendar li.event_course,
|
||||
#calendar .maincalendar li.event_global,
|
||||
#calendar .maincalendar li.event_user,
|
||||
#calendar .maincalendar li.event_group,
|
||||
#calendar .filters td.event_course,
|
||||
#calendar .filters td.event_global,
|
||||
#calendar .filters td.event_user,
|
||||
#calendar .filters td.event_group {
|
||||
-moz-border-radius:4px;
|
||||
}
|
||||
|
||||
/***
|
||||
*** Course
|
||||
***/
|
||||
|
Loading…
x
Reference in New Issue
Block a user