Moodle

Display individually colour coded events for detailed month view rather than random day colours

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Calendar
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

Currently the detailed month view displays a background colour for any day that has an event, however this does not make sense when there is more than one event per day and different types of events as the day background colour is confusing. The change here is to colour code the individual events within a day as opposed to attempting to colour code the day itself

  1. mdl-12075.patch
    09/Nov/07 1:19 AM
    2 kB
    Derek Woolhead
  2. rounded.patch
    09/Nov/07 6:51 PM
    0.8 kB
    Sam Marshall
  1. after.png
    34 kB
    09/Nov/07 1:17 AM
  2. after2.png
    34 kB
    09/Nov/07 6:48 PM
  3. before.png
    34 kB
    09/Nov/07 1:17 AM

Activity

Hide
Sam Marshall added a comment -

To clarify: look at the 'Before' screenshot to see what was wrong. It was OK when there was only a single event in a day but works really badly when there are two different types in one day. One type (at random or maybe the highest level) gets chosen for the colour for the day, and some of the other events are coloured on top of that in 'their' colour while others aren't... it's a mess.

This patch makes colouring apply to the events within a day only and not to the day as a whole. Now colouring within the main monthly view is 100% consistent in all cases, making it clearer (for example) what will be shown/hidden when the user clicks those options.

The patch does not address the related issue in the mini-calendar where obviously we cannot take the same approach as using the current technique it is only possible to use one colour for each day. I suppose ideally you'd have some kind of striped bitmap in the background there, but perhaps that can be left for improvement at a later date.

Show
Sam Marshall added a comment - To clarify: look at the 'Before' screenshot to see what was wrong. It was OK when there was only a single event in a day but works really badly when there are two different types in one day. One type (at random or maybe the highest level) gets chosen for the colour for the day, and some of the other events are coloured on top of that in 'their' colour while others aren't... it's a mess. This patch makes colouring apply to the events within a day only and not to the day as a whole. Now colouring within the main monthly view is 100% consistent in all cases, making it clearer (for example) what will be shown/hidden when the user clicks those options. The patch does not address the related issue in the mini-calendar where obviously we cannot take the same approach as using the current technique it is only possible to use one colour for each day. I suppose ideally you'd have some kind of striped bitmap in the background there, but perhaps that can be left for improvement at a later date.
Hide
Sam Marshall added a comment -

Petr has pointed out that these would look better (and more consistent) with rounded corners to match the ones in the mini-calendar. I am looking to see if that can be added to the patch, will update with a revised patch later.

Show
Sam Marshall added a comment - Petr has pointed out that these would look better (and more consistent) with rounded corners to match the ones in the mini-calendar. I am looking to see if that can be added to the patch, will update with a revised patch later.
Hide
Sam Marshall added a comment -

This patch uses the (Mozilla-only) rounded corners to achieve the result shown in after2.png - rounded corners on events (and also on the two event keys).

Show
Sam Marshall added a comment - This patch uses the (Mozilla-only) rounded corners to achieve the result shown in after2.png - rounded corners on events (and also on the two event keys).
Hide
Eloy Lafuente (stronk7) added a comment -

+1 for the colourised events. Absolutely more descriptive!

Show
Eloy Lafuente (stronk7) added a comment - +1 for the colourised events. Absolutely more descriptive!
Hide
Martin Dougiamas added a comment -

+1 from me! Looks great!

Show
Martin Dougiamas added a comment - +1 from me! Looks great!
Hide
Sam Marshall added a comment -

Thanks! Committed to 1.9 and HEAD.

Show
Sam Marshall added a comment - Thanks! Committed to 1.9 and HEAD.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: