MDL-12075 Display individually colour-coded events in calendar rather than random day colours

This commit is contained in:
sam_marshall 2007-11-19 10:53:23 +00:00
parent 21090e447a
commit 9b50bd46ad
3 changed files with 12 additions and 10 deletions

View File

@ -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;

View File

@ -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');
}

View File

@ -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
***/