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
Line 16: Line 16:
All management of events that you might need to do can be done by 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]
(Rossi, describe this class and the methods available here - don't duplicate phpdocs but talk about the things that are possible in general.  Try grouping all the functions into "clumps" that make sense)
 


==Examples==
==Examples==

Revision as of 08:20, 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 - don't duplicate phpdocs but talk about the things that are possible in general. Try grouping all the functions into "clumps" that make sense)

Examples

Adding an event to the calendar


Dealing with files


etc

See also