a cleaner calendar

a cleaner calendar

by Aaron P -
Number of replies: 16

Hello,

I'm hoping someone can help me with a question I have about formatting the Calendar in a Moodle course I am putting together.

Currently my Calendar block displays the standard links to the events, ie. a link for Global, Group, Course, and User events. I would like to eliminate these links for a cleaner look, but also keep the ability to put course events in as an administrator so that the coloured dates still appear. Please see the attached image.

I'm guessing this will take away the user's ability to set a User event, but that's OK.

Is there a way to do this?

Thanks,
Aaron

Attachment calendar-moodle.gif
Average of ratings: -
In reply to Aaron P

Re: a cleaner calendar

by John Isner -
I like your idea of a streamlined Calendar interface. But without the color key, how will users differentiate the various types of events, except by memorizing the colors? The color key is necessary, but it certainly doesn't need to take up 1/3 of the block.

Getting back to your suggestion, removing the bottom portion of the Calendar block would also remove the hide/show controls. I don't see this as a problem because the hide/show controls also appear on the Detailed month view page.

You say that by removing the bottom portion of the Calendar block, users would lose the ability to create user events. Why? The events that a user can create are determined by the contents of the pull-down menu on the Detailed month view page.

Getting back to hide/show, I don't understand the rationale for this feature as it is currently implemented. Specifically, I don't understood why Calendar gives every user the ability to hide any type of event. For example, it lets students hide course events. I can't think of a single use case for this (unless it is to give students an excuse for not knowing that a course event was scheduled smile Shouldn't the ability to hide/show events be capability-based? Then the default roles could be defined such that
  • every user can hide/show his own user events
  • teachers can hide/show course and group events
  • admins can hide/show global events.
Calendar certainly has an idiosyncratic interface, that has always puzzled me. It is easy to imagine a more Moodle-like interface, i.e., one with an Editing calendar page launched by an Edit icon.
In reply to John Isner

Re: a cleaner calendar

by Aaron P -

Hi John,

Thanks for your comments. To answer your question, "But without the color key, how will users differentiate the various types of events, except by memorizing the colors?":

In my case, there is only one event I will be using - course events. So my students won't need to differentiate events. One colour indication in the calendar is good enough.

Aaron

In reply to Aaron P

Re: a cleaner calendar

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
adding

.block_calendar_month .eventskey,
.block_calendar_month .filters {
display: none;
}

to your theme should do it.
In reply to Tim Hunt

Re: a cleaner calendar

by Aaron P -

Hi Tim,

Thanks for your advice and code. I'm PHP-challenged and a Moodle back-end lightweight, and that's being polite to myself. When you say add this piece of code to my theme, what Moodle file would that be?

Thanks,
Aaron

In reply to Aaron P

Re: a cleaner calendar

by Albert F -
Hi Aaron,

How did you get a cleaner calendar finally, did you success?

I would like to hide or deactivate all those filters and just use course events.

Regards,
Albert
In reply to Albert F

Re: a cleaner calendar

by Phil Raymond -
I would also like to hide these event keys, if anyone knows how.

Thanks,
Phil
In reply to Phil Raymond

Re: a cleaner calendar

by Zoe Bogner -
Simply add Tim's code:

.block_calendar_month .eventskey,
.block_calendar_month .filters {
display: none;
}

to the end of you're theme's main/layout style sheet, for example is you use the Standard theme, stick it in styles_layout.css

If you're using a custom theme and don't have a clue which stylesheet to put it in, I think you can take your pick (someone please correct me on that if I'm wrong, still on coffee #1 for today..), but change the 3rd line to:
display: none !important;
!important will override anything that might come along and override that attribute.
In reply to Zoe Bogner

Re: a cleaner calendar

by Glenn Sisson -

I wish to achieve the same re remove the events key block.

I tried the above code in my custom skin pagelayout.css without effect.

I am using Moodle 2.0. Is the script still accurate (re name of block etc).

I have tried to source this without luck.

Please advise. Thanks

In reply to Glenn Sisson

Re: a cleaner calendar

by Deborah Lynch -

Hi Glenn,

I am using Moodle 2.2 with the Fusion theme.  And the code with !important works perfectly for me that Tim and Zoe suggested.  

Using the core.css (rather than pagelayout).

Bon fortune!

In reply to Deborah Lynch

Re: a cleaner calendar

by Lawrence Graham -

Hello Deborah,

Do you have any idea regarding how I can get this code to work with the Fandango theme.  I have tried all of the previously stated options with no success.

Thanks,

Lawrence

 

 

In reply to Aaron P

cleaner calendar - no key events

by Paula Jimenez -

Hello,

the solutions proposed didn´t work for me. I am still looking for the same ... Does anyone know how to do it?

I just want the calendar to show the course events

Thank you!!!!

In reply to Paula Jimenez

Re: cleaner calendar - no key events

by Bob Puffer -

Well... this may be a lot more than you want but I'll give it a go.  I've never been any kind of a fan of the Moodle calendar and in my (albeit, poor) recollection, I don't think its gotten much care over the nine years we've been with Moodle. We use Google calendar and instructors can embed it in their Moodle course site however they want.  The key for our system is we create a Google account tied to the course (using course shortname). We then have code operating behind the scenes that synchronize all events in Moodle to the Google calendar (not using iCal files, they don't work). If I haven't totally turned you off then I'd be plenty willing to share our code with you so you can also make it happen. Its been running in production for two years for a Higher Ed institution of 2,500 ftes.

In reply to Bob Puffer

Re: cleaner calendar - no key events

by Paula Jimenez -

Hi Bob! Than you for answering.

English is not my first language and I´m not sure if you want to share the Google option or if your code for modifying Moodle to remove the key events.

Iam not interested in conecting with Google calendar because I don´t want another tool, another password, etc. I am glad I can have the admin password and do everything in Moodle.

It´s just that we only have group events and I dont want to show all those confusing key that people have no idea what they are for.

Thank you for bothering. If you know how to change the code of Moodle, I will apreciate it a lot if you share with me. But I guess you use the Google option.

Have a nice day

Paula

In reply to Paula Jimenez

Re: cleaner calendar - no key events

by P Braby -

How exactly did the solution fail, did you understand the instructions ok?
For me using moodle 2.5 I was able to hide the filters by the following steps:

  1. If unknown, find out the themes you are using by going to Site Administration -> Appearance -> Themes -> Theme Selector
    This will show the themes in use on your site. For me there is only a default theme set and it is called "Anomaly".
  2. For each theme from the selector, open the settings for that theme (Site Admin ->Appearance ->Themes -> [Theme name])
  3. On each settings page one of the boxes will be called "Custom CSS". In this box you put two new lines at the end:

    .eventskey{display: none;}
    .calendar_filters{display: none;}

    and save changes.

 

In reply to P Braby

Re: cleaner calendar - no key events

by Brian Pool -

Excellent!  Best answer yet, no coding, just worked!


Thanks,


Brian

In reply to P Braby

Re: cleaner calendar - no key events

by Ekene Olatunji -

Thanks P Brady for the help but when I used it, the Events key title was still visible so I replace the css codes with these two lines of CSS in the settings of my theme:

.block_calendar_month.block .filters.calendar_filters 
{display:none;}
.block_calendar_month.block .eventskey {display:none;}

Afterwards, every element of Events key on my calendar block as removed. I hope this helps someone else aswell.