ics as webservice? - another way?

ics as webservice? - another way?

by Karsten Roemke -
Number of replies: 2

Hello,

I didn't find a solution to my problem, maybe I don't use the right search terms.

I'm developing a small module (my first try) to plan the written exams in a department of a school.
Short description: Teachers  just choose the class / learning group enter the date and time and this is stored in some tables so that pupil can watch the dates.

It work's so far,  I have to do some testing.

My question is: How can I offer a possibility to include the data into an external calender eg google / android / iphone ?
Should I write a webservice?  - Each user should get a different link which allows him to see the data. I want to differ between pupil and teachers, pupils should only see the calender of a class, teacher should see their own entries, and maybe administrators should see all entries.

I think I could write a small php script which serves an ical file, because I have direct access to the database,   but then I have no authentication implemented. I think it would be nice to generate a unique link which could be used in a calendar program. I never handled with calenders so my question maybe is stupid: How the calender is actualized if a date changes: Does a typical calender application periodically poll the url with the calendar?
Any help or hints for further reading would be nice.

Karsten

Average of ratings: -
In reply to Karsten Roemke

Re: ics as webservice? - another way?

by Mark Johnson -
Core developers இன் படம் Particularly helpful Moodlers இன் படம் Peer reviewers இன் படம் Plugin developers இன் படம்

Some calendar apps allow you to import .ics files, others allow you to "subscribe" to a URL which it will poll regularly, or on demand when you view the calendar to update the information.

You might want to look at Moodle's own calendar functionality - it already has the ability to produce ical files.  You may be able to re-use some of the code, or even simply insert events into a Moodle calendar and use the ical URL as an endpoint.