Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Calendar API: Difference between revisions

From MoodleDocs
No edit summary
Line 3: Line 3:
==Overview==
==Overview==


The Moodle [[:en:Calendar]] collects and displays calendar events from everything users have access to.
The Moodle [[:en:Calendar|Calendar]] collects and displays calendar events from everything users have access to.


If your plugin generates calendar events (such as due dates) then you need to add your events to the calendar.
If your plugin generates calendar events (such as due dates) then you need to add your events to the calendar.

Revision as of 08:18, 13 January 2012

The Calendar API allows you to add and modify events in the calendar for user, groups, courses, or the whole site.

Overview

The Moodle Calendar collects and displays calendar events from everything users have access to.

If your plugin generates calendar events (such as due dates) then you need to add your events to the calendar.

File locations

All the calendar code is located in /calendar/lib.php. You need to include this file in your script if you intend to use it.


The calendar_event class

All management of events that you might need to do can be done by the calendar_event() class.

[Rossi, describe this class and the methods available here]


Examples

Adding an event to the calendar


Dealing with files


etc

See also