The idea of integrating a calendar into Moodle has come up frequently during the past year. Students here in York would like a calendar to see the times for their lectures, seminars and, most importantly from their point of view, deadlines. Several of the Moodle activities have dates associated with them and they could all show up in the student's calendar.
I know that from the Moodle point of view a calendar is not so important because its educational benefit is not very clear. However student convenience does count and therefore integration of a calendar is going to be one of the required features here in an upcoming tender for a centrally supported VLE.
A calendar was planned as a central feature of the MyMoodle page. However I am not aware of any work towards it having taken place. I would like to find some other Moodlers who would like to see a calendar in Moodle and would like to start collaborating on this little project.
I have had a look at available PHP calendars and it seems to me that WebCalendar fits our requirements very well. In addition to user calendars it allows non-user calendars. Users can include any number of these non-user calendars into their calendar, WebCalendar speaks of "layers". So I propose that every course in Moodle should have a calendar associated to it. Each user could have the calendars of all the courses they are enrolled in layered onto their calendar. That way they will have all the relevant Moodle dates visible in their calendar but can also add any events of their own.
Installation of WebCalendar is very unproblematic. I unzipped it into a calendar subdirectory of my moodle directory, put the details of the moodle database into WebCalendars config file, created the required tables using a supplied .sql file, placed a Web link to the calendar onto the Moodle home page and it worked straightaway. If you like to play with this non-integrated calendar you can go to my site http://aiminfo.net and use the Calendar link at the bottom of the Main menu.
The following things now need to be done to integrate the calendar into Moodle:
1) there needs to be a script that creates a calendar for each Moodle user and one for each Moodle course and layers the course calendars into the user calendars. This would be done in bulk the first time the calendar is installed but should later be done whenever a user or a course is created and when a user is enrolled or unenrolled.
2) the link from the Moodle homepage needs to post the username and password to automatically log the user into WebCalendar.
3) there need to be library functions in Moodle to create, change, and delete events in WebCalendar.
4) all date related modules in Moodle should use these functions to update the course calendars whenever appropriate.
I think we will not need to do much hacking of WebCalendar itself which will make it a lot easier to upgrade. Because any interaction with the calendar will be through Moodle library functions we can also switch over to a different PHP calendar in the future should that be desirable.