## Course formats: oohoo - Calendar format

format_calendar
Maintained by Nicolas Bretin, Patrick Thibaudeau
This course format displays a course in a calendar format.
84
138
7

This course format displays a course in a calendar format.

The functionalities are:

• Hide/Display weekends,
• Display by week (With previous/next week buttons),
• Display by month (With previous/next month buttons)
• The current day is highlighted

### Contributors

Nicolas Bretin (Lead maintainer)
Patrick Thibaudeau: Maintainer
Please login to view contributors details and/or to contact them

• Fri, May 17, 2013, 12:56 AM
Hi Patrick and Nicolas,

Will there be a Moodle 2.5 version soon?

I'm currently getting the warning:

Function print_section() is deprecated. Please use course renderer function course_section_cm_list() instead.
line 3160 of \lib\deprecatedlib.php: call to debugging()
line 118 of \course\format\calendar\format.php: call to print_section()
line 276 of \course\view.php: call to require()

I did fork the format but could not replace print_section with:

echo $this->courserenderer->course_section_cm_list($course, $thissection, 0); echo$this->courserenderer->course_section_add_cm_control($course,$thissection->section, 0);

Because you are not yet using the class in 'renderer.php' fully.

Cheers,

Gareth
• Fri, May 17, 2013, 3:26 AM
Hi Gareth,

We plan on updating all of our plugins for 2.5 over the summer. I don't have an actual time frame for the calendar course format right now.
• Sat, Sep 7, 2013, 12:21 PM
Hi guys,
I am using Moodle 2.5 and am getting a bug with calendar 1.0.4. All activities added are duplicating themselves. This is in edit mode only, but it is getting confusing. And if I delete one, they will both delete. I am also not getting an add activity or resource in each day as shown in your screen shots. Thanks for your help, love the plugin otherwise.
--Janice
• Fri, May 2, 2014, 4:02 AM
Is there a way I can query all the classes offered on a particular day or what all days is a course offered ?
The reason is we need to write reports which will join further tables with this information.
• Wed, May 21, 2014, 5:40 AM
Hi,
I am using moodle 2.6 and I have a problem with the highlighted Current day on the course main page.
Instead of the following (li for non-current day): < li id="section-1" class="section main yui3-dd-drop" role="region" aria-label=" 19 May" >
the current day shows the following li: < li id="section-2" class="section main yui3-dd-drop" "="" accesshide="" aria-label=" < span class=" > Current day 20 May" role="region" >
This causes the date to show:
Current day 20 May" role="region" > Current day 20 May

instead of just Current day 20 May.

If you can just point me in the direction of which file I can find the broken code in, that would be great. I am not sure where to look. Thanks for your help!
• Thu, Jun 26, 2014, 11:36 PM
Peace:

How to increase more than 52 sections in the course calendar format? For example 140.

Greetings.

José de Jesús.
• Thu, Sep 18, 2014, 2:40 AM
Has anyone found the fix for the display issue Madeleine mentioned above? I think I've tracked it down to the format.php file, and can see where the error comes in with the html code, but I can't find the php that generates the error.

You can set the max number of sections in the site admin course default settings - max number of sections.
• Thu, Sep 18, 2014, 3:13 AM
Hi Curtis,
I managed to fix the code for my purposes, however I have no idea if this is a permanent/stable way to fix it. In the file format.php line 241 originally read: $currenttext = get_accesshide(get_string('currentday', 'format_calendar')); I changed it to read:$currenttext = get_string('currentday', 'format_calendar');

This fixed the current day text for me.
• Fri, Sep 19, 2014, 3:01 AM
Looks like that did it. Thanks loads.
• Fri, Dec 12, 2014, 3:05 AM
Please update module !!!
• Mon, Dec 15, 2014, 2:36 AM
Would it be possible updated to version 2.8
• Thu, Mar 10, 2016, 7:22 PM
Can you please update this to the latest version of Moodle?