ICal export

From Dokeos

Jump to: navigation, search

Contents

Introduction

The calendar-based tools in Dokeos strongly lacked an iCal export of some kind. Some research on the internet showed that:

  1. WebCalendar has a crappy code structure
  2. phpiCalendar doesn't offer export for iCal files
  3. iCalcreator seems like the right match. It offers only one file (a large class) and is in LGPL so we can easily integrate it inside Dokeos

How to offer it in Dokeos

A script, main/calendar/ical_export.php, handles the generation of the iCal document (.ics), with only a few parameters.

A link on the upper-right corner of any event is offered to export as iCal, as is currently the case for CSV exports.

Three icons offer the export in different variations: one as public event, another as private event and a third as confidential event.

The icons used are main/img/export.png, export_low_fade.png and export_high_fade.png

Basically, the generation script takes as parameters:

  • cidReq (the id of the course, if any)
  • unique event id (in the personal agenda or the cours agenda table, depending on the existence of a course ID)
  • type is "personal" or "course" to indicate if this comes from a course agenda or from the personal agenda. This could be left out considering we check the course code, but it is considered as an added check until now
  • class is taken in the sense of the iCal standard's class. It is either "public","private" or "confidential"

As of now, multiple iCal events are not handled by the script (but can be handled by the iCalcreator class).

Where to put the icalcreator class

A directory icalcreator will be placed inside main/inc/lib/

Development information

http://www.kigkonsult.se/iCalcreator/

http://www.kigkonsult.se/iCalcreator/docs/using.html

Personal tools