The import subscription form should only appear for those users who already have the capability to add calendar events to that course calendar.

Subscriptions list

The import calendar form should show you a list of existing subscriptions, if any. This list allows you to

Update the poll interval. This can be never, hourly, daily, weekly, monthly, or annually. Choose one from the list and click the Update button for that subscription.

Remove the subscription. This will also remove any events added by the subscription from the calendar. Click the Remove button.

Import Calendar form

This form will let you add a subscription from a calendar URL, or import events from an uploaded calendar file.

Calendar name: this should be mandatory and should not accept blank values.

Import from: choose either a URL or a file

Calendar URL: a URL to an external ics calendar file

this field should be disabled if Import from is set to import from a file

Calendar file: lets you choose or upload a calendar file using the standard Moodle file browser

this field should be disabled if Import from is set to import from a URL

Poll interval. This can be never, hourly, daily, weekly, monthly, or annually.

this field has no effect when adding events from a calendar file.

Type of event. This allows you to select which calendar the events should be added to - the same as when adding a single event normally.

The list should display only those calendars you have permission to add events to - at either a user, group, course or site level.

Group: this lets you select which group to add events to.

this field should only be visible if you can add events to one or more groups.

this field should only show groups that you have permission to add events to.

Click Add to import the events from the calendar file, or add the calendar subscription.

Poll interval

The cron task should update calendar subscriptions as recorded in the mdl_event_subscriptions table, and as controlled by the poll interval. In the database, pollinterval is stored as a number of seconds, and calculated in cron using the current timestamp and the lastupdated field. In this way, monthly is actually anually divided by 12, rather than a strict calendar month.

NOTE TO TESTER: This feature really needs full QA testing, in the absence of detailed QA tests, please do exploitory testing on this feature. Particularly paying attention to editing, updating, deleting. Invalid files etc.
Import form in calendar view
The import subscription form should only appear for those users who already have the capability to add calendar events to that course calendar.
Subscriptions list
The import calendar form should show you a list of existing subscriptions, if any. This list allows you to
Update the poll interval. This can be never, hourly, daily, weekly, monthly, or annually. Choose one from the list and click the Update button for that subscription.
Remove the subscription. This will also remove any events added by the subscription from the calendar. Click the Remove button.
Import Calendar form
This form will let you add a subscription from a calendar URL, or import events from an uploaded calendar file.
Calendar name: this should be mandatory and should not accept blank values.
Import from: choose either a URL or a file
Calendar URL: a URL to an external ics calendar file
this field should be disabled if Import from is set to import from a file
Calendar file: lets you choose or upload a calendar file using the standard Moodle file browser
this field should be disabled if Import from is set to import from a URL
Poll interval. This can be never, hourly, daily, weekly, monthly, or annually.
this field has no effect when adding events from a calendar file.
Type of event. This allows you to select which calendar the events should be added to - the same as when adding a single event normally.
The list should display only those calendars you have permission to add events to - at either a user, group, course or site level.
Group: this lets you select which group to add events to.
this field should only be visible if you can add events to one or more groups.
this field should only show groups that you have permission to add events to.
Click Add to import the events from the calendar file, or add the calendar subscription.
Poll interval
The cron task should update calendar subscriptions as recorded in the mdl_event_subscriptions table, and as controlled by the poll interval. In the database, pollinterval is stored as a number of seconds, and calculated in cron using the current timestamp and the lastupdated field. In this way, monthly is actually anually divided by 12, rather than a strict calendar month.

Description

Would be great if one could, either at the site, course or user level in the Moodle calendar:

1) SUBSCRIBE to an external iCal calendar feed (such as to a Google Calendar ical feed) to auto-update the site events INTO MOODLE (not export out of Moodle, which already exists.) This way, if a school has a calendar already published with an ical feed (such as a Google calendar), an admin in Moodle could subscribe to that external ical feed and have all the school's events posted automatically in the Moodle calendar. By the same token, perhaps an instructor could subscribe to an ical feed for his or her course to feed in course level entries, or an individual with ical feeds could subscribe to them to sync them into their Moodle calendar.

This is a very critical component for our school, exactly as it is decribed. We have been wanted this ability for a couple of years. We would like to sync/import the "site" calendar with our all school calendar, the division calendars (Primary (prek-1), Lower (2-5), Middle (6-8) and Upper (9-12) with the division courses, and allow the students to set up individual icals syncs for the sports they are participating in. I can see why many other schools would not want this.

Bill Pickett
added a comment - 26/Nov/08 10:12 AM This is a very critical component for our school, exactly as it is decribed. We have been wanted this ability for a couple of years. We would like to sync/import the "site" calendar with our all school calendar, the division calendars (Primary (prek-1), Lower (2-5), Middle (6-8) and Upper (9-12) with the division courses, and allow the students to set up individual icals syncs for the sports they are participating in. I can see why many other schools would not want this.

A brief thought as I pass through ... we'll need to add a "source" calendar field to the events table (and an events_sources table describing the feeds), so that we can safely delete everything associated with the external calendar before/during every update from the iCal feed (to make sure we don't have events in Moodle that were deleted on the external calendar.

Martin Dougiamas
added a comment - 26/Nov/08 10:20 AM A brief thought as I pass through ... we'll need to add a "source" calendar field to the events table (and an events_sources table describing the feeds), so that we can safely delete everything associated with the external calendar before/during every update from the iCal feed (to make sure we don't have events in Moodle that were deleted on the external calendar.

Edward Beckmann
added a comment - 28/Jan/09 3:34 AM I use an open source utility called gcaldaemon for syncing - I'm not a programmer, but its principles / code may help with this one? http://gcaldaemon.sourceforge.net/
Ed

Lisa Sieverts
added a comment - 19/Feb/09 1:25 AM We desperately need this, too. We use webmail/kronolith to manage our school calendar, so need to be able to SUBSCRIBE to multiple kronolith calendars in Moodle.

As we are implementing Zimbra Email Collaboration Suite, we would also appreciate the ability to sync our Moodle calendar from a calendar in Zimbra. Zimbra uses ical as well and has the ability to share/sync information. This would significantly reduce work loads on our secretaries plus improve the overall usefulness of Moodle as there are many other uses we can think of such as what Bill Pickett talked about. Thanks for the opportunity to share our thoughts...

Pascal Raven
added a comment - 28/Apr/09 5:28 AM As we are implementing Zimbra Email Collaboration Suite, we would also appreciate the ability to sync our Moodle calendar from a calendar in Zimbra. Zimbra uses ical as well and has the ability to share/sync information. This would significantly reduce work loads on our secretaries plus improve the overall usefulness of Moodle as there are many other uses we can think of such as what Bill Pickett talked about. Thanks for the opportunity to share our thoughts...

Kenneth Newquist
added a comment - 28/Apr/09 9:26 PM +1 for the ability to subscribe to an external calendar. We're also using Zimbra (as well as other external calendars) and this would be a great boon to Moodle on our campus.

We are more interested in being able to IMPORT an ical file into the Moodle calendar than to sync it. We have our school calendar in webcalendar at the moment and would like to move it into the Moodle site calendar.

Jon Witts
added a comment - 03/Jun/09 10:45 PM We are more interested in being able to IMPORT an ical file into the Moodle calendar than to sync it. We have our school calendar in webcalendar at the moment and would like to move it into the Moodle site calendar.

Kathreja Mills
added a comment - 19/Jun/09 1:35 AM This is something that my organization (JSEA) would need. We would save so much staff time being able to just import our staff calendar rather then updating multiple calendars.

Eugene Istomin
added a comment - 23/Jul/09 1:43 PM Ability to sync with others calendar sources will be real progress to Moodle-on-desktop.
Many peoples have troubles in creation study calendars directly in Moodle. Universities have a problem with calendar modification difficulties.
Sync is the best way.
Have you any ideas/code examples for sync? I can help you with implementing icalsync and testing.

Our school has just adopted moodle and this is the first thing that I needed to do. It would save a tremendous amount of effort if there was some way to IMPORT calendars into moodle even if it was just copying from one course to another.

John Cork
added a comment - 04/Aug/09 1:58 AM Our school has just adopted moodle and this is the first thing that I needed to do. It would save a tremendous amount of effort if there was some way to IMPORT calendars into moodle even if it was just copying from one course to another.

Mário Gonçalves
added a comment - 19/Aug/09 7:02 PM The lack of this feature is basicallly the only reason why our group still needs a website, really.
We use Google Calendars integrated with out website to alert current and potential students of upcoming courses.
With it implemented, we'd be able to have Moodle as both our courses' internal workplace and external showcase. Not to mention sync'ing would save a lot of time from all our staff.

Sync is what most people really want, whether they know it or not. They want a calendar to keep up-to-date with an external source, possibly with multiple calendars like Thunderbird.

You might check out the SyncML extension code that Jörg Lehrke has written against eGroupware. His homepage is http://k.noc.de/ The code implements SyncML 1.2 and is written in php. The patch may be better to use because it highlights the changes needed to add syncml to the larger project. I haven't looked at the code, but I have used the patch.

My users are starting to ask for this functionality which I haven't seen elsewhere. I hope this feature sees some progress.

Boyd Duffee
added a comment - 06/Oct/09 5:02 PM Sync is what most people really want, whether they know it or not. They want a calendar to keep up-to-date with an external source, possibly with multiple calendars like Thunderbird.
You might check out the SyncML extension code that Jörg Lehrke has written against eGroupware. His homepage is http://k.noc.de/ The code implements SyncML 1.2 and is written in php. The patch may be better to use because it highlights the changes needed to add syncml to the larger project. I haven't looked at the code, but I have used the patch.
My users are starting to ask for this functionality which I haven't seen elsewhere. I hope this feature sees some progress.

Importing an iCal formatted file would be better for me since I am handed an updated .doc file, which I have to parse and import fresh every month into a Joomla JEvents calendar.

Part of that process includes making the file into a CSV, loading it into Google Calendars, exporting that and importing the iCal file. (I used to just import it into and from an OSX ical file, but that involved even another program and getting a linkable URL has been a problem for it.

Anything would help, but I would like to bring in a CSV file, or failing that, an iCal .ics file.

Charles Flynn
added a comment - 11/Dec/09 11:25 PM Sync would be good, but it would be more cumbersome for me.
Importing an iCal formatted file would be better for me since I am handed an updated .doc file, which I have to parse and import fresh every month into a Joomla JEvents calendar.
Part of that process includes making the file into a CSV, loading it into Google Calendars, exporting that and importing the iCal file. (I used to just import it into and from an OSX ical file, but that involved even another program and getting a linkable URL has been a problem for it.
Anything would help, but I would like to bring in a CSV file, or failing that, an iCal .ics file.

I've made a start at looking how this feature could be implemented.
The attached patch displays an "Import Calendar" button alongside the "Export" one, which takes you to the import page. Selecting an ical file will upload and parse it into a format that Moodle can use (objects for insertion into the events table), and display a sample of the appointments in the file.

This isn't usable yet, as it's currently quite specific to files generated with Novell Groupwise. If someone would like to send me (or post on this discussion: http://moodle.org/mod/forum/post.php?reply=559776) examples of .ics files from other applications, it would certainly help me along the way.

Mark Johnson
added a comment - 22/Dec/09 5:03 PM I've made a start at looking how this feature could be implemented.
The attached patch displays an "Import Calendar" button alongside the "Export" one, which takes you to the import page. Selecting an ical file will upload and parse it into a format that Moodle can use (objects for insertion into the events table), and display a sample of the appointments in the file.
This isn't usable yet, as it's currently quite specific to files generated with Novell Groupwise. If someone would like to send me (or post on this discussion: http://moodle.org/mod/forum/post.php?reply=559776 ) examples of .ics files from other applications, it would certainly help me along the way.

Jim Crumley
added a comment - 22/Dec/09 10:54 PM Here's another ics file, from another one.
I haven't looked at the patch yet, but are ytou using a library to read the ics? There are
lots of good libraries out there - I would avoid reinventing the wheel on this, if possible.
Thanks for working on this.

Thank you Frosty, Clark and Jim, it's certainly interesting to see the differences between the files output by different programs.

Jim,
I looked at a couple of libraries, but the ones I tried couldn't parse the export from Groupwise I had (although this is probably Groupwise's fault looking at the other ics files - for some reason it doesn't "nest" the VEVENTS correnctly and puts all the END: EVENT lines at the end of the file). I'd much rather use (or at least modify) an existing library than write one myself, the patch I used was purely to see if you can get data into a format that Moodle can use, which you can quite easily.
If someone can recommend a library to use for this, I'll look into it.

Mark Johnson
added a comment - 22/Dec/09 11:16 PM Thank you Frosty, Clark and Jim, it's certainly interesting to see the differences between the files output by different programs.
Jim,
I looked at a couple of libraries, but the ones I tried couldn't parse the export from Groupwise I had (although this is probably Groupwise's fault looking at the other ics files - for some reason it doesn't "nest" the VEVENTS correnctly and puts all the END: EVENT lines at the end of the file). I'd much rather use (or at least modify) an existing library than write one myself, the patch I used was purely to see if you can get data into a format that Moodle can use, which you can quite easily.
If someone can recommend a library to use for this, I'll look into it.

Martin Dougiamas
added a comment - 23/Dec/09 4:14 PM Moodle includes the bennu library already http://bennu.sourceforge.net/ which should be able to do this, right?
Note, bennu was created by Jon Papaioannou, a former Moodle developer.

I did see bennu late yesterday, looks like it should be up to the job, and all the better if it's already included.
I noticed moodle.org in the example code, that explains why!
I'll look at using the bennu library to do the job. Thanks guys.

Mark Johnson
added a comment - 23/Dec/09 4:39 PM I did see bennu late yesterday, looks like it should be up to the job, and all the better if it's already included.
I noticed moodle.org in the example code, that explains why!
I'll look at using the bennu library to do the job. Thanks guys.

Ok, I've taken a look at bennu. It seems that Jon Papaioannou managed to get enough of the iCalendar standard implemented to enable exports from Moodle (calendar and event creation, but not much more) before becoming unable to work on it.

However, there was some code posted on the project's forum with a view to implementing an import feature. It looks promising, although still requires a little bit of work. The rest of the iCalendar components listed in http://www.ietf.org/rfc/rfc2445.txt (P. 50-72) also need implementing before it will work reliably, but the groundwork's already there so it's not too arduous a task.
I'll keep you posted.

Mark Johnson
added a comment - 24/Dec/09 4:03 PM Ok, I've taken a look at bennu. It seems that Jon Papaioannou managed to get enough of the iCalendar standard implemented to enable exports from Moodle (calendar and event creation, but not much more) before becoming unable to work on it.
However, there was some code posted on the project's forum with a view to implementing an import feature. It looks promising, although still requires a little bit of work. The rest of the iCalendar components listed in http://www.ietf.org/rfc/rfc2445.txt (P. 50-72) also need implementing before it will work reliably, but the groundwork's already there so it's not too arduous a task.
I'll keep you posted.

I've made quite a bit of progress with implementing the import feature to bennu. I used the unserialize() method from the project's sourceforge forum as a base (are the licensing concerns in this regard? I emailed the poster but am yet to receive a response), and identified the unimplemented areas of the RFC which I've implemented to the best of my ability.

The error handling could use some improvement. Currently erroneous lines are dropped and logged to that errors can be repeated later, but this isn't perfect due to recursive calls to the function.

The outlook and google calendars posted both parse happily and the resulting data (after invalid bits are dropped) can be converted into a format that Moodle is happy with. The only problem I came across was my Groupwise calendar due to the aforementioned problem with nesting events, but doing a find-and-replace to fix the nesting allowed the file to parse.

Mark Johnson
added a comment - 05/Jan/10 7:03 PM I've made quite a bit of progress with implementing the import feature to bennu. I used the unserialize() method from the project's sourceforge forum as a base (are the licensing concerns in this regard? I emailed the poster but am yet to receive a response), and identified the unimplemented areas of the RFC which I've implemented to the best of my ability.
The error handling could use some improvement. Currently erroneous lines are dropped and logged to that errors can be repeated later, but this isn't perfect due to recursive calls to the function.
The outlook and google calendars posted both parse happily and the resulting data (after invalid bits are dropped) can be converted into a format that Moodle is happy with. The only problem I came across was my Groupwise calendar due to the aforementioned problem with nesting events, but doing a find-and-replace to fix the nesting allowed the file to parse.

I am new at this, but I have been playing around trying to embed iCal into Moodle. This is my first post here or anywhere. I am working on a website wehre you could go and download the whole zipped file. I will describe what I did and then attach a screenshot. I am not a programmer, so bear with me.

I redesigned Moodle and added features of a calendar like iCal. Essentially I embedded a web published version of iCal (phpicalandar) into Moodle. PHP iCalendar is a php-based iCal file parser. It displays iCal files in a nice logical, clean manner with day, week, month, and year navigation. You can add and edit these events online.

When a teacher or student first logs into the Course Management Calendar a window opens up that shows all the classes the student is enrolled in or that the teacher teaches. Teachers are able to edit classes and add homework assignments. Both students and teachers are able to add one type of event into the calendar. Students can view which classes are being taught, what is taught and what the homework is that is assigned and when it is due.

The calendar is shown on the opening page. Moodle works in the background and if open has all its usual functionality.

Volker Krasemann
added a comment - 10/Jan/10 10:26 AM Hello,
I am new at this, but I have been playing around trying to embed iCal into Moodle. This is my first post here or anywhere. I am working on a website wehre you could go and download the whole zipped file. I will describe what I did and then attach a screenshot. I am not a programmer, so bear with me.
I redesigned Moodle and added features of a calendar like iCal. Essentially I embedded a web published version of iCal (phpicalandar) into Moodle. PHP iCalendar is a php-based iCal file parser. It displays iCal files in a nice logical, clean manner with day, week, month, and year navigation. You can add and edit these events online.
When a teacher or student first logs into the Course Management Calendar a window opens up that shows all the classes the student is enrolled in or that the teacher teaches. Teachers are able to edit classes and add homework assignments. Both students and teachers are able to add one type of event into the calendar. Students can view which classes are being taught, what is taught and what the homework is that is assigned and when it is due.
The calendar is shown on the opening page. Moodle works in the background and if open has all its usual functionality.

Bill Pickett
added a comment - 12/Jan/10 2:37 AM I am trying to follow the discussion but the technical is quite technical for me. What I would like is for the calendar to access an outlook calendar automatically and pull the updates.

Volker,
That's pretty impressive for a self-confessed non programmer!
I've avoided including an entire separate ical-based system since Moodle already has calendar functionality built in. However, your solution would probably suit some people - you might want to create a discussion about how to do it on the Calendar forum.

Bill,
That would certainly be the ideal situation to have. However there's quite a bit of groundwork to do first so that Moodle can understand the file format required. Once that's done the possibility of "syncing" with other calendar apps like Outlook can be explored.

As a general update to this bug, I've been in contact with Jon Papaioannou about the bennu library. I'm still waiting to hear from him a second time but it's possible that I'll commit my changes (when they've been brought up to standard) to the library upstream (less code to maintain in Moodle) and we can then use it for our needs.

Mark Johnson
added a comment - 12/Jan/10 6:31 PM Volker,
That's pretty impressive for a self-confessed non programmer!
I've avoided including an entire separate ical-based system since Moodle already has calendar functionality built in. However, your solution would probably suit some people - you might want to create a discussion about how to do it on the Calendar forum.
Bill,
That would certainly be the ideal situation to have. However there's quite a bit of groundwork to do first so that Moodle can understand the file format required. Once that's done the possibility of "syncing" with other calendar apps like Outlook can be explored.
As a general update to this bug, I've been in contact with Jon Papaioannou about the bennu library. I'm still waiting to hear from him a second time but it's possible that I'll commit my changes (when they've been brought up to standard) to the library upstream (less code to maintain in Moodle) and we can then use it for our needs.

Mark,
I just had a very large meeting with my Moodle users and the Calendar Import links is something they would REALLY like to use. We currently link 3-4 different calendars and waste huge amount of time.

Is there any update on the good work you have done with iCal imports? We have a several moodle test servers and would be glad to test out code if I can find out where it lives and the best way to put it into a test environment.

We currently use Moodle 1.9.5 or newer, but could install any flavor of Moodle you need for testing. Can we get an update on what versions of Moodle are compatible? And let me know if testing it would help you at some time OK? and a huge thanks for tackling this challenge!!

Mark Hilliard
added a comment - 18/Mar/10 1:38 AM Mark,
I just had a very large meeting with my Moodle users and the Calendar Import links is something they would REALLY like to use. We currently link 3-4 different calendars and waste huge amount of time.
Is there any update on the good work you have done with iCal imports? We have a several moodle test servers and would be glad to test out code if I can find out where it lives and the best way to put it into a test environment.
We currently use Moodle 1.9.5 or newer, but could install any flavor of Moodle you need for testing. Can we get an update on what versions of Moodle are compatible? And let me know if testing it would help you at some time OK? and a huge thanks for tackling this challenge!!
Mark H.
Mpls, MN USA

Thanks for your efforts in getting this much needed and gobsmackingly absent function added to Moodle...I'm just here to add my support...I don't think I could add anything much by way of comment to what has already been said...except for my own preferences/requirements, just to bolster those of others here...

Specifically I want to be able to connect with iCal and/or .Mac (effectively same thing), and or Google Calendar.

Either way, being able to import a Calendar, connect and synchronize with other online Calendars has to be a standard feature for anything in the age of Web2.0/e-Learning...doesn't it? :-P

Stephen Glanville
added a comment - 07/Apr/10 7:52 PM Hi Folks
Thanks for your efforts in getting this much needed and gobsmackingly absent function added to Moodle...I'm just here to add my support...I don't think I could add anything much by way of comment to what has already been said...except for my own preferences/requirements, just to bolster those of others here...
Specifically I want to be able to connect with iCal and/or .Mac (effectively same thing), and or Google Calendar.
Either way, being able to import a Calendar, connect and synchronize with other online Calendars has to be a standard feature for anything in the age of Web2.0/e-Learning...doesn't it? :-P
Cheers
Stephen Glanville

Martin Dougiamas
added a comment - 07/Apr/10 8:20 PM Good going, Mark!!
I'm happy to try and squeeze it into Moodle 2.0 if we can get a bunch of people to review and test your work. And getting it standard in Bennu would make it even easier.

I have been watching this issue very closely and would love to help test. while I am not a PHP expert I have people at my work who are excellent.
I also can create virtual Moodle servers very quickly and test things for you.

I just downloaded all the files at the top of this tracker issue, but I am fairly new to Moodle tracker.

I have shell access to all my servers and can upload via Filezilla to any place with proper security, Just need to know WHERE things go.

We also have several Google accounts with larger calendars to use for testing.

Can anyone give me the basics info for placing/installing the PHP and/or patch files to get started with testing?

Mark Hilliard
added a comment - 08/Apr/10 6:13 AM Mark Johnson, Martin D,
I have been watching this issue very closely and would love to help test. while I am not a PHP expert I have people at my work who are excellent.
I also can create virtual Moodle servers very quickly and test things for you.
I just downloaded all the files at the top of this tracker issue, but I am fairly new to Moodle tracker.
I have shell access to all my servers and can upload via Filezilla to any place with proper security, Just need to know WHERE things go.
We also have several Google accounts with larger calendars to use for testing.
Can anyone give me the basics info for placing/installing the PHP and/or patch files to get started with testing?
Mark Hilliard
MPLS, MN

Woah!
Sorry I haven't replied to this in a while everyone, I've been busy with other projects and haven't had a chance to revisit issue.
I'm currently at a bit of a roadblock as my institution is (very slowly) reviewing it's policy for releasing my code, so I've been asked not to release anything until the policy is clarified. I'm going to try my hardest to get this actioned within the next week or so.

Martin, that's awesome! I'll try my hardest to get it released before the beta is out.

I still haven't heard back from Jon Papaioannou regarding getting access to the Bennu upstream project. Does anyone have a current email address for him? He doesn't seem to check his moodle.org one anymore.

Mark Johnson
added a comment - 08/Apr/10 3:36 PM Woah!
Sorry I haven't replied to this in a while everyone, I've been busy with other projects and haven't had a chance to revisit issue.
I'm currently at a bit of a roadblock as my institution is (very slowly) reviewing it's policy for releasing my code, so I've been asked not to release anything until the policy is clarified. I'm going to try my hardest to get this actioned within the next week or so.
Martin, that's awesome! I'll try my hardest to get it released before the beta is out.
I still haven't heard back from Jon Papaioannou regarding getting access to the Bennu upstream project. Does anyone have a current email address for him? He doesn't seem to check his moodle.org one anymore.

Sorry, I didn't mention, the code I currently have needs some substantial testing, but is a great improvement over the patch I've already submitted here. I've acted on some of the feedback Jon gave me to improve the code quality, and from the testing I've done it works pretty well (and even copes with some of the more serious departures from the standard produced by some programs). It definitely needs more testing, so I'll get it up here as soon as I can.

Mark Johnson
added a comment - 08/Apr/10 3:42 PM Sorry, I didn't mention, the code I currently have needs some substantial testing, but is a great improvement over the patch I've already submitted here. I've acted on some of the feedback Jon gave me to improve the code quality, and from the testing I've done it works pretty well (and even copes with some of the more serious departures from the standard produced by some programs). It definitely needs more testing, so I'll get it up here as soon as I can.

Mark Johnson
added a comment - 19/Apr/10 9:26 PM I've now gotten hold of Jon who has agreed to add me to the Bennu project. Once my code's in the library, I'll post a patch with my latest code and instructions on how to test it out.

Good news! I've now had by modifications to bennu added to the upstream project's SVN.
The attached patch is not my final proposed fix for the issue, but will allow people to test the functionality. It applies the latest version of bennu from SVN, and adds in interface to import iCalendar files. After applying, use the following steps to test it out:

Navigate to calendar/view.php (accessible from the Calendar and Upcoming Events blocks)
Click [[importcalendar]]
Select your .ics file and upload
You may see a lot of debugging messages about invalid properties. These are not fatal, and can for the most part be ignored. If there are any invalid component messages, there may be an issue.
At the bottom of the page there will be a table with a preview of 20 events that are to be imported, as well as a count of any that are not displayed. Check that those displayed match what you're expecting.
Select the type of events you want to create (Site/Course/User), and click Import Events. You should see a summary of any that are imported or updated.
You can now return to the calendar and check that the events have imported.

If you can post a comment saying which system your .ics file was generated from and your results, that would be a great help.

Mark Johnson
added a comment - 04/May/10 5:45 PM Good news! I've now had by modifications to bennu added to the upstream project's SVN.
The attached patch is not my final proposed fix for the issue, but will allow people to test the functionality. It applies the latest version of bennu from SVN, and adds in interface to import iCalendar files. After applying, use the following steps to test it out:
Navigate to calendar/view.php (accessible from the Calendar and Upcoming Events blocks)
Click [ [importcalendar] ]
Select your .ics file and upload
You may see a lot of debugging messages about invalid properties. These are not fatal, and can for the most part be ignored. If there are any invalid component messages, there may be an issue.
At the bottom of the page there will be a table with a preview of 20 events that are to be imported, as well as a count of any that are not displayed. Check that those displayed match what you're expecting.
Select the type of events you want to create (Site/Course/User), and click Import Events. You should see a summary of any that are imported or updated.
You can now return to the calendar and check that the events have imported.
If you can post a comment saying which system your .ics file was generated from and your results, that would be a great help.

Hello, I am quite new at moodle and am having troubles with getting this to work. I have all of the files, but am not sure what I do or where I need to put the code in order for this to work. I am trying to have our Google Calendar Ical be on on our Moodle Calendar as well. If there is any step by step instructions on how to do this or any more detailed instructions, that would be great.

Alex Brady
added a comment - 05/May/10 3:37 AM Hello, I am quite new at moodle and am having troubles with getting this to work. I have all of the files, but am not sure what I do or where I need to put the code in order for this to work. I am trying to have our Google Calendar Ical be on on our Moodle Calendar as well. If there is any step by step instructions on how to do this or any more detailed instructions, that would be great.
Thanks!

Hi Alex,
Please note that this isn't yet ready for use on a production system. If you're looking for a reliable implementation of iCal imports, please wait until it's included in the Moodle package.
However, if you've got a test server and would like to try it out, you'll need to download calendar_test.patch and apply it to the code in your test environment (see instructions on applying patches here: http://docs.moodle.org/en/Development:How_to_apply_a_patch). Once that's done, follow the steps in my previous comment to try it out.
Thanks

Mark Johnson
added a comment - 05/May/10 3:22 PM Hi Alex,
Please note that this isn't yet ready for use on a production system. If you're looking for a reliable implementation of iCal imports, please wait until it's included in the Moodle package.
However, if you've got a test server and would like to try it out, you'll need to download calendar_test.patch and apply it to the code in your test environment (see instructions on applying patches here: http://docs.moodle.org/en/Development:How_to_apply_a_patch ). Once that's done, follow the steps in my previous comment to try it out.
Thanks

Backing up calendar is also a little unclear. Been editing MoodleDocs and tried to backup demo course to restore my calendar entries when it refreshed on the hour. MoodleDocs said an ics could be used as a backup. I assumed I could create the file via Calendar export, then import it. I guess this just meant that you could print up a copy using another calendar program. Not a backup.

Importing an ics file would be nice. And feature should also be on permission list. I would not trust some students or teachers to populate a calendar with their imported events.

Chris Collman
added a comment - 05/May/10 10:12 PM Backing up calendar is also a little unclear. Been editing MoodleDocs and tried to backup demo course to restore my calendar entries when it refreshed on the hour. MoodleDocs said an ics could be used as a backup. I assumed I could create the file via Calendar export, then import it. I guess this just meant that you could print up a copy using another calendar program. Not a backup.
Importing an ics file would be nice. And feature should also be on permission list. I would not trust some students or teachers to populate a calendar with their imported events.

I downloaded the patch.exe and placed it in C:/bin/patch.exe
I then took the calendar_test.patch and placed inside my moodle root folder at C:\xampp\htdocs\moodle\

I opened up calendar_test.patch and saved it as thispatch.patch in the same directory
I then went into the directory in command prompt of the patch file, C:\xampp\htdocs\moodle\
Then I typed in c:\bin\patch.exe --dry-run -p1 < thispatch.patch

When I did this, I got messages saying that the different hunks had failed. I don't know if you or anyone can help me with my specific case, but it would be very nice to be able to import the ical. I am testing this on a live, but somewhat of a test Moodle server. We are begining to implement it at our school, but it has not fully been developed yet.

Alex Brady
added a comment - 06/May/10 3:37 AM Thanks for the response Mark!
I tried following the steps here http://docs.moodle.org/en/Development:How_to_apply_a_patch
I downloaded the patch.exe and placed it in C:/bin/patch.exe
I then took the calendar_test.patch and placed inside my moodle root folder at C:\xampp\htdocs\moodle\
I opened up calendar_test.patch and saved it as thispatch.patch in the same directory
I then went into the directory in command prompt of the patch file, C:\xampp\htdocs\moodle\
Then I typed in c:\bin\patch.exe --dry-run -p1 < thispatch.patch
When I did this, I got messages saying that the different hunks had failed. I don't know if you or anyone can help me with my specific case, but it would be very nice to be able to import the ical. I am testing this on a live, but somewhat of a test Moodle server. We are begining to implement it at our school, but it has not fully been developed yet.
Thanks

Hi Guys, thanks for helping out!
Sorry, I should have said something about backing up.
The best way to back up before you start is to do a mysqldump (or Export in phpMyAdmin) of the {$prefix}event table, as that's the only one that's modified. Once you've tested an import you can just restore it to the previous state.

Permissions are currently handled by the moodle/calendar:manage{$foo}entries permissions. E.g. Users can only import events to a calendar where they can already create them. Do we need any additional control than this?

Alex,
Do you have any way of creating a duplicate of your installation to test against? I'd hate for you to mess up your institution's only install.
Which version are you trying to patch against? I created the patch against 1.9.8+ which I checked out on Monday. If you're using an earlier version that might be why there's problems. Can you post up the output of the patch command with --dry-run?

Mark Johnson
added a comment - 06/May/10 4:00 PM Hi Guys, thanks for helping out!
Sorry, I should have said something about backing up.
The best way to back up before you start is to do a mysqldump (or Export in phpMyAdmin) of the {$prefix}event table, as that's the only one that's modified. Once you've tested an import you can just restore it to the previous state.
Permissions are currently handled by the moodle/calendar:manage{$foo}entries permissions. E.g. Users can only import events to a calendar where they can already create them. Do we need any additional control than this?
Alex,
Do you have any way of creating a duplicate of your installation to test against? I'd hate for you to mess up your institution's only install.
Which version are you trying to patch against? I created the patch against 1.9.8+ which I checked out on Monday. If you're using an earlier version that might be why there's problems. Can you post up the output of the patch command with --dry-run?

If you're still having problems, this might simplify things a bit:
I've uploaded an updated version of the bennu library to MDL-22308. The files in the zip file there are a drop-in replacement for the files in /lib/bennu.
calendar_test2.patch from this issue only patches the calendar component of Moodle to provide the import interface. This should be easier as there's less to go wrong.

Mark Johnson
added a comment - 06/May/10 10:24 PM If you're still having problems, this might simplify things a bit:
I've uploaded an updated version of the bennu library to MDL-22308 . The files in the zip file there are a drop-in replacement for the files in /lib/bennu.
calendar_test2.patch from this issue only patches the calendar component of Moodle to provide the import interface. This should be easier as there's less to go wrong.
Thanks
Mark

Hi Mark,
Thanks for all your hard work on this incredibly useful feature! Has there been any progress on making it stable enough for production use (and inclusion in Moodle core)? We'd really like to be able to use this, but from the comments here, it doesn't sound like it's quite ready for production use. How far away do you think it is?

Paul Nicholls
added a comment - 01/Jul/10 5:53 AM Hi Mark,
Thanks for all your hard work on this incredibly useful feature! Has there been any progress on making it stable enough for production use (and inclusion in Moodle core)? We'd really like to be able to use this, but from the comments here, it doesn't sound like it's quite ready for production use. How far away do you think it is?
Cheers,
Paul

Charles Flynn
added a comment - 07/Jul/10 1:31 AM I just loaded the patch...so, can verify that on Moodle 1.9.9 on a shared Linux server, the patch responded without errors using Terminal on Mac OSX 10.6.4
I'll now start testing an import or three.

I'm sorry to report that I have exported several ics calendar files from Google Calendar, from my Mac iCal, and from the calendar at dcinematools.com - I can look at all the internals from these calendars and see that they seem to be valid files.

But they do not seem to import into the Moodle Calendar. It goes through the process correctly, I hit Preview, and it doesn't 'see' the event.

These are all events that I can successfully import with a double click into the Mac iCal program.

I have created a new event in Moodle calendar, exported it, then modified it with new dates. That will add successfully to Mac iCal.

In only this case, when I use the import event in Moodle, the event will Preview...that is, I can see the event at the top of the screen.

It asks if I want it for the user or for global, and after hitting "Import Events", it comes back with "0 events imported successfully. 0 events updated."

So, either I have loaded the patch wrong, or I have Moodle Calendar set up to not accept events this way, or there is something wrong with the script.

To test the first, I have used both the patch (which seemed to work - at least, it doesn't work the same way I have just described), and I also did the long route of uploading the files into the event folder...with the same effect.

As far as permissions, I am using the admin account which is set up to make calendar events.

Charles Flynn
added a comment - 11/Jul/10 2:38 AM I'm sorry to report that I have exported several ics calendar files from Google Calendar, from my Mac iCal, and from the calendar at dcinematools.com - I can look at all the internals from these calendars and see that they seem to be valid files.
But they do not seem to import into the Moodle Calendar. It goes through the process correctly, I hit Preview, and it doesn't 'see' the event.
These are all events that I can successfully import with a double click into the Mac iCal program.
I have created a new event in Moodle calendar, exported it, then modified it with new dates. That will add successfully to Mac iCal.
In only this case, when I use the import event in Moodle, the event will Preview...that is, I can see the event at the top of the screen.
It asks if I want it for the user or for global, and after hitting "Import Events", it comes back with "0 events imported successfully. 0 events updated."
So, either I have loaded the patch wrong, or I have Moodle Calendar set up to not accept events this way, or there is something wrong with the script.
To test the first, I have used both the patch (which seemed to work - at least, it doesn't work the same way I have just described), and I also did the long route of uploading the files into the event folder...with the same effect.
As far as permissions, I am using the admin account which is set up to make calendar events.
Ideas?

Sorry for my recent silence, it appears that I wasn't watching the issue so didn't recieve notifications of the recent updates.
Charles, thank you very much for testing the system. Can I ask what debugging level your Moodle is set to, and if it produced any errors? Also, would you be able to post the iCal files you were using up here, to see if I can identify the problem?

Martin, I don't honestly think this solution is going to be ready for 2.0 (it's currently written for 1.9 APIs anyway) unless someone else finds time to iron out the creases for me, so it might be best to pencil it in for 2.1?

Mark Johnson
added a comment - 20/Jul/10 7:13 PM Sorry for my recent silence, it appears that I wasn't watching the issue so didn't recieve notifications of the recent updates.
Charles, thank you very much for testing the system. Can I ask what debugging level your Moodle is set to, and if it produced any errors? Also, would you be able to post the iCal files you were using up here, to see if I can identify the problem?
Martin, I don't honestly think this solution is going to be ready for 2.0 (it's currently written for 1.9 APIs anyway) unless someone else finds time to iron out the creases for me, so it might be best to pencil it in for 2.1?

Charles Flynn
added a comment - 20/Jul/10 11:13 PM Mark, I will write you a private email, to suggest an idea offline, and send some of my personal files.
I haven't set Moodle for any debugging level. I suppose that is easy to do, but one more thing to learn that I haven't had to do.
Charles

Just a note to testers as I don't think my instructions were clear enough before, and led to the problems Charles was having:

To test my patch, you will need to replace the contents of /lib/bennu with the contents of the bennu.zip from MDL-22308, NOT the bennu.tar.gz from this page.
You'll then need to apply calendar_test2.patch from this issue. Sorry if this has caused any confusion.

If the bennu.tar.gz file on this page could be deleted, that would probably help ease confusion.

Mark Johnson
added a comment - 22/Jul/10 10:22 PM Just a note to testers as I don't think my instructions were clear enough before, and led to the problems Charles was having:
To test my patch, you will need to replace the contents of /lib/bennu with the contents of the bennu.zip from MDL-22308 , NOT the bennu.tar.gz from this page.
You'll then need to apply calendar_test2.patch from this issue. Sorry if this has caused any confusion.
If the bennu.tar.gz file on this page could be deleted, that would probably help ease confusion.

Charles Flynn
added a comment - 03/Aug/10 10:33 PM After Mark made changes to my configuration;
I have successfully imported an .ics file that I generated by exporting it from Mac iCal. It has dozens of events.
I had failures importing the Ringmer and t.ics files that are included at the top of this project. They both threw a number of errors, and did not import at all. (These have been sent to Mark.)
So, partial great success.
It would be good to know from the people who deposited those files how they were generated.

I made t.isc with a perl script that I wrote. The script uses use fairly standard perl libraries - Data::ICal and Date::ICal - for creating the events, though I did copy some of the timezone portions of the header
from elsewhere.

I have used these ics files most often with Google calendar, though I have also tested them with a few other programs including Mozilla Sunbird, Evolution, and Outlook. I haven't had any problems with other programs parsing them, though it wouldn't surprise me much if there were issues with the header.

Jim Crumley
added a comment - 03/Aug/10 11:09 PM Charles,
I made t.isc with a perl script that I wrote. The script uses use fairly standard perl libraries - Data::ICal and Date::ICal - for creating the events, though I did copy some of the timezone portions of the header
from elsewhere.
I have used these ics files most often with Google calendar, though I have also tested them with a few other programs including Mozilla Sunbird, Evolution, and Outlook. I haven't had any problems with other programs parsing them, though it wouldn't surprise me much if there were issues with the header.

It seems that the problems Charles has been experiencing were down to permissions - There was nothing preventing an unprivileged user from attempting to import, which caused problems. calendar_test3.patch checks that the user is allowed to create events before giving them access to the import page, so any user who is able to access the page shouldn't experience the problems Charles was having.

Again, you'll need to install the updated bennu library from MDL-22308 to test this patch.

Mark Johnson
added a comment - 04/Aug/10 5:23 PM It seems that the problems Charles has been experiencing were down to permissions - There was nothing preventing an unprivileged user from attempting to import, which caused problems. calendar_test3.patch checks that the user is allowed to create events before giving them access to the import page, so any user who is able to access the page shouldn't experience the problems Charles was having.
Again, you'll need to install the updated bennu library from MDL-22308 to test this patch.

Lei Zhang
added a comment - 05/Aug/10 10:23 AM Mark,
Your last patch calendar_test3.path was truncated in line 151, you might want to upload another one.
When I upload the test calendar from Ringmer Community college in this ticket, it returns some errors although I've no trouble of view them after importing.
Failed to add property on line 46
Failed to add property on line 61
Failed to add component on line 70
Invalid line: 71, ignoring
Importing a calendar straight from MS Outlook, event start time will reset back to 1970.

just pulled to the latest CVS update (20100804), then updated the bennu libs from the other ticket, then applied the patch. I added the string to lang/en_utf8/calendar.php - and everything appears as it should so I have a "Import Calendar" button depending on if the user has permissions in Moodle - but clicking "import calendar" always results in a white page.

Permissions in /calendar are all 644, and the bennu libs all have the same permissions as the files that weren't overwritten (can't remember off-hand)

I turned on debugging and set it to developer, but I don't get anything on the page.

Daniel Wahl
added a comment - 05/Aug/10 2:55 PM Mark,
just pulled to the latest CVS update (20100804), then updated the bennu libs from the other ticket, then applied the patch. I added the string to lang/en_utf8/calendar.php - and everything appears as it should so I have a "Import Calendar" button depending on if the user has permissions in Moodle - but clicking "import calendar" always results in a white page.
Permissions in /calendar are all 644, and the bennu libs all have the same permissions as the files that weren't overwritten (can't remember off-hand)
I turned on debugging and set it to developer, but I don't get anything on the page.

Lei, I just downloaded calendar_test3.patch and it's got everything it needs, it may have been that your download got interrupted.
Those error messages you get are just debugging from the parser, dropping properties that aren't supported and so on, so nothing to worry about. Once I know it's working, I'll make sure it only displays them when the appropriate debugging level is set.

Daniel,
Can you confirm that calendar/import.php and calendar/calendar_import_form.php were created when you applied the patch?

Mark Johnson
added a comment - 05/Aug/10 4:06 PM Lei and Daniel, thank you for helping test this solution.
Lei, I just downloaded calendar_test3.patch and it's got everything it needs, it may have been that your download got interrupted.
Those error messages you get are just debugging from the parser, dropping properties that aren't supported and so on, so nothing to worry about. Once I know it's working, I'll make sure it only displays them when the appropriate debugging level is set.
Daniel,
Can you confirm that calendar/import.php and calendar/calendar_import_form.php were created when you applied the patch?
Thanks!

Daniel Wahl
added a comment - 06/Aug/10 2:33 PM Mark they were both created:
import.php (20.6KB)
157 lines (including whitespace)
starts with php open tags and require ../config.php
ends with print_footer(); and php close tags
calendar_import_form.php (1.6KB)
50 lines (including whitespace)
starts with php open tags and require ../config.php
ends with closing bracket for calendar_import_confirm_form class extender and php close tags
all files in /calendar/ are 644 and calendar/ is 755 (like all other directories at the root level)
—
the above info came from gphpedit - different editors may display differently I suppose.

but do find them afterwards in the calendar when importing from Google Calendar.

When trying to import from a Yahoo Calendar there were loads of errors and everything went to 1/1/1970

Here are some of the errors:

Notice: Undefined index: SUMMARY in C:\wamp\www\moodle\calendar\import.php on line 116

Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 116

Notice: Undefined index: DESCRIPTION in C:\wamp\www\moodle\calendar\import.php on line 117

Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 117

Notice: Undefined index: DTSTART in C:\wamp\www\moodle\calendar\import.php on line 118

Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 118

Notice: Undefined index: DTEND in C:\wamp\www\moodle\calendar\import.php on line 119

I think these errors cause a few hundred blank entries to be added so on 1/1/1970 in the calendar I have a really long list of blank entries + a few non blank ones (the actual entries in my Calendar that got sent to 01/01/1970). I see in the database loads of blank entries where timestart is 0 (01/01/1970) as below

Barry Oosthuizen
added a comment - 09/Aug/10 3:24 AM Hi Mark,
Thanks for your work on this, it's really needed.
I have the same problem as Lei, with patch 3. Here is what I get when I open the patch (line 151):
+ echo '<p><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=upcoming&course='.$courseid.'&', $now ['mday'] , $now['mo
I think it should be:
+ echo '<p><a href="'.calendar_get_link_href(CALENDAR_URL.'view.php?view=upcoming&course='.$courseid.'&', $now ['mday'] , $now ['mon'] , $now ['year'] ).'">Back to Calendar.</a></p>';
Whenever I try and import a file I get:
0 events imported successfully.
0 events updated
but do find them afterwards in the calendar when importing from Google Calendar.
When trying to import from a Yahoo Calendar there were loads of errors and everything went to 1/1/1970
Here are some of the errors:
Notice: Undefined index: SUMMARY in C:\wamp\www\moodle\calendar\import.php on line 116
Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 116
Notice: Undefined index: DESCRIPTION in C:\wamp\www\moodle\calendar\import.php on line 117
Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 117
Notice: Undefined index: DTSTART in C:\wamp\www\moodle\calendar\import.php on line 118
Notice: Trying to get property of non-object in C:\wamp\www\moodle\calendar\import.php on line 118
Notice: Undefined index: DTEND in C:\wamp\www\moodle\calendar\import.php on line 119
I think these errors cause a few hundred blank entries to be added so on 1/1/1970 in the calendar I have a really long list of blank entries + a few non blank ones (the actual entries in my Calendar that got sent to 01/01/1970). I see in the database loads of blank entries where timestart is 0 (01/01/1970) as below
id name description format courseid groupid userid repeatid modulename instance eventtype timestart Ascending timeduration visible uuid sequence timemodified
214 0 0 0 2 0 0 0 0 1 eTjZPzRWiMLCzi8T6vw0982lkj34kSTGXp364pyaFp 1 1281294009
Cheers,
Barry

Mark Johnson
added a comment - 09/Aug/10 10:58 PM I've just re-uploaded the patch, Barry and Lei, please try to download it again.
Daniel, when you increased the Debug Messages level to DEVELOPER did you also check "Display Debug Messages" so that they print to the page, rather than the error log?

Barry Oosthuizen
added a comment - 10/Aug/10 12:13 AM Hi Mark,
The new patch3 still looks the same to me.
I've attached another one here.
By the way, the 0 events imported successfully, 0 events updated issue I had has been resolved (my mistake).
Cheers,
Barry

Mark Johnson
added a comment - 10/Aug/10 3:18 PM Thanks Barry,
Both patches look the same to me, but if the "fixed" one works better for everyone, please use that.
Can I confirm, Barry, that you've managed to apply the patch and successfully import ical files?

I had turned on print debugging. I just rolled back, and applied the patch again, with the calendar_test3_fixed - and it worked. So I'm guessing it's a line feed error (was the patch made on Windows?) or something goofy like that.

So from looking briefly this patch is an import patch - not a 'subscribe' patch right? subscription is what I'm hoping will eventually be implemented, so that our teachers can 'push' updates to Moodle from iCal.

Daniel Wahl
added a comment - 10/Aug/10 3:51 PM Mark,
I had turned on print debugging. I just rolled back, and applied the patch again, with the calendar_test3_fixed - and it worked. So I'm guessing it's a line feed error (was the patch made on Windows?) or something goofy like that.
So from looking briefly this patch is an import patch - not a 'subscribe' patch right? subscription is what I'm hoping will eventually be implemented, so that our teachers can 'push' updates to Moodle from iCal.
Hope I don't sound too greedy, I really am thankful for your work!

Barry,
Could you post the Yahoo calendar that's giving you problems, or email it to me if you don't want to post it publicly?

Daniel,
That's correct, I'm only focusing on import at the moment. Once that's done, what I've got in mind is some sort of cron job which can call a list of URLs at regular intervals to sync with icals somewhere on the web. I don't know enough about other implementations of sync/subscribe to know how it might work if the ical file isn't accessible on the web, but anyone who does is most welcome to contribute your knowledge!

Mark Johnson
added a comment - 10/Aug/10 3:59 PM Barry,
Could you post the Yahoo calendar that's giving you problems, or email it to me if you don't want to post it publicly?
Daniel,
That's correct, I'm only focusing on import at the moment. Once that's done, what I've got in mind is some sort of cron job which can call a list of URLs at regular intervals to sync with icals somewhere on the web. I don't know enough about other implementations of sync/subscribe to know how it might work if the ical file isn't accessible on the web, but anyone who does is most welcome to contribute your knowledge!

I've just taken a look into Brian's problem and it seems that Yahoo Calendar exports a slightly non-standard ics file. I have contacted Yahoo to let them know (the functionality's currently in beta anyway), and will wait to see what they say. I may modify the parser to allow for their error.

Mark Johnson
added a comment - 10/Aug/10 7:23 PM I've just taken a look into Brian's problem and it seems that Yahoo Calendar exports a slightly non-standard ics file. I have contacted Yahoo to let them know (the functionality's currently in beta anyway), and will wait to see what they say. I may modify the parser to allow for their error.

This is our only serious problem with moodle - that we cannot let it be part of our calendar information chain.

Calendars are born in our study administrative system and supposed to be spread to the students mail accounts (after some manipulation) as individual user calendars - as well as class calendars that need to be available in moodle.

chester folming
added a comment - 28/Oct/10 7:25 PM How is this issue coming along?
This is our only serious problem with moodle - that we cannot let it be part of our calendar information chain.
Calendars are born in our study administrative system and supposed to be spread to the students mail accounts (after some manipulation) as individual user calendars - as well as class calendars that need to be available in moodle.
Could you please give the status of this issue as of October 2010..?

Hi Chester,
From the feedback I've had so far the patch seems to "work", the problems that people have had seem to be down to not applying the patch correctly, or incompatible files (Yahoo calendar still appears to produce non-standard files). I've not had any more feedback, so I suppose it's up to the core dev team what happens next. If the decision's made that it needs to support Yahoo calendar, I'll need to modify the bennu library to allow it. I'll then produce a clean patch against 1.9 and add it to the modules and plugins database. Since the target for this bug is 2.1, I'll need to update the code to version 2 APIs, which I'll do sometime before next summer, unless someone wants to do it for me.

Mark Johnson
added a comment - 29/Oct/10 5:04 PM Hi Chester,
From the feedback I've had so far the patch seems to "work", the problems that people have had seem to be down to not applying the patch correctly, or incompatible files (Yahoo calendar still appears to produce non-standard files). I've not had any more feedback, so I suppose it's up to the core dev team what happens next. If the decision's made that it needs to support Yahoo calendar, I'll need to modify the bennu library to allow it. I'll then produce a clean patch against 1.9 and add it to the modules and plugins database. Since the target for this bug is 2.1, I'll need to update the code to version 2 APIs, which I'll do sometime before next summer, unless someone wants to do it for me.

LIP
added a comment - 25/Jan/11 8:10 PM Hi all,
I just want to know what is the status of this feature? Is ok to use in production structures? The feature is in "Unresolved" status.
I would like to install it. I have version Moodle 1.9.8+ (Build: 20100428).
With the best regards,

The feature is not yet in Moodle core. I wouldn't recommend the patch for production sites, but if you have a test site you can install it on and it works for your use case, it should be OK for production sites as far as I know (you probably haven't read through all the comments, but I've not been able to confirm any issues with the patch itself. Yahoo produces a slightly non-standard ical file that the import script doesn't like, but other than that all reported issues have been due to the patch being incorrectly applied). However, until Moodle HQ can provide some feedback, I'm at a bit of a dead end with regards to developing this any further.

Mark Johnson
added a comment - 25/Jan/11 9:24 PM The feature is not yet in Moodle core. I wouldn't recommend the patch for production sites, but if you have a test site you can install it on and it works for your use case, it should be OK for production sites as far as I know (you probably haven't read through all the comments, but I've not been able to confirm any issues with the patch itself. Yahoo produces a slightly non-standard ical file that the import script doesn't like, but other than that all reported issues have been due to the patch being incorrectly applied). However, until Moodle HQ can provide some feedback, I'm at a bit of a dead end with regards to developing this any further.

I've just applied this cleanly against 1.9.10. Importing works fine, but the preview function comes up blank for the test data. I'm using the 2011 Detroit Tigers schedule which is available as an iCal download: http://mlb.mlb.com/schedule/downloadable.jsp?c_id=det. I've tested other ics files and the preview function does work. I've compared the output of the preview data and the data eventually imported and they appear to be the same, so I'm a little stumped as to why it can't unserialize it for previewing. As I said it does import into the calendar without trouble.

Charles Fulton
added a comment - 26/Jan/11 1:30 AM I've just applied this cleanly against 1.9.10. Importing works fine, but the preview function comes up blank for the test data. I'm using the 2011 Detroit Tigers schedule which is available as an iCal download: http://mlb.mlb.com/schedule/downloadable.jsp?c_id=det . I've tested other ics files and the preview function does work. I've compared the output of the preview data and the data eventually imported and they appear to be the same, so I'm a little stumped as to why it can't unserialize it for previewing. As I said it does import into the calendar without trouble.

Jonathan Harker
added a comment - 04/Feb/11 7:47 AM Hi there,
Just FYI I'm porting this import patch to 2.0 for a client, and hopefully we can get this and MDL-22308 pulled into 2.0 master and possibly MOODLE_19_STABLE too.

Jonathan Harker
added a comment - 04/Feb/11 7:58 AM In the meantime for Moodle 1.9 the three commits on top of http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/MDL-16660_19 are calendar_test3_fixed.patch from this ticket (author Mark Johnson) plus two commits to update lib/bennu (see MDL-22308 ).
Cheers, J

Mark Johnson
added a comment - 04/Feb/11 4:24 PM Thanks very much for your input here Jonathon, I've not had a lot of time to work on this myself recently, so your help in getting this sorted is very much appreciated.

Jonathan Harker
added a comment - 01/Mar/11 12:13 PM Work for a client has expanded this into importing from a URL and having it synced from a cron - WIP at http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/feature-20-importcalendar

Derek Chirnside
added a comment - 24/May/11 11:31 AM The Moodle in Schools distribution has this work from Catalyst built in as standard. http://www.moodleinschools.org.nz/forum/topics/5067 . Seems to be working well.
I'm assuming someone has asked for this to be included in Moodle core? Anyone abl to comment?
-Derek

Would very much like to see this in core, as tech staff who need to upgrade many sites will take a lot of work to install all separately. This really would help Moodle be an integrated part of school's educational website systems too!! Huge vote for putting in CORE.

Mark Hilliard
added a comment - 24/May/11 10:53 PM Would very much like to see this in core, as tech staff who need to upgrade many sites will take a lot of work to install all separately. This really would help Moodle be an integrated part of school's educational website systems too!! Huge vote for putting in CORE.
Mark H.

Edmund Best
added a comment - 25/May/11 5:44 AM I echo these comments, PLEASE put this in the core distro! Great work by people over a long time, I think that this would massively benefit schools in their distribution of calendar information.

I'd like to review the feature-20-importcalendar branch and see if needs a bit of a tidy up for core (stuff in local/importcalendar should be moved into core somewhere, for instance). Will add this to the heap

Jonathan Harker
added a comment - 25/May/11 6:30 AM I'd like to review the feature-20-importcalendar branch and see if needs a bit of a tidy up for core (stuff in local/importcalendar should be moved into core somewhere, for instance). Will add this to the heap

Thanks for bumping this. I really would like to see this happen and soon. we're about to begin a new school year, and I've got a lot of dates on other calendars. So being able to subscribe to them would be a lot easier than re-entering them in Moodle.

Ken Tuley
added a comment - 17/Jun/11 10:12 AM Thanks for bumping this. I really would like to see this happen and soon. we're about to begin a new school year, and I've got a lot of dates on other calendars. So being able to subscribe to them would be a lot easier than re-entering them in Moodle.

This would be a very powerful district-wide integration option for schools.

In business they call this stuff "enterprise" level tools and that's what it really is.

I estimate 70-80% of schools I worked with had a calender application for the district that really should be integrated with on-line learning tool like Moodle so students/parents would see a "common" calendar. Google Calendar support would easily be most powerful for schools in Midwest US.

Mark Hilliard
added a comment - 17/Jun/11 10:10 PM This would be a very powerful district-wide integration option for schools.
In business they call this stuff "enterprise" level tools and that's what it really is.
I estimate 70-80% of schools I worked with had a calender application for the district that really should be integrated with on-line learning tool like Moodle so students/parents would see a "common" calendar. Google Calendar support would easily be most powerful for schools in Midwest US.

Sorry to be so contrary and at so late a date but I believe this is the wrong direction. Seems like we're protecting the walled garden and not considering how we can make Moodle resources (events) available in state-of-the-art tools used by others. In the Midwest US (where I'm from) I'm seeing many schools, K-12 and higher ed going to Google Apps for Education. The calendar functionality in Google works tremendously and sharing infrastructure is already in-place. Moodle's calendar has major flaws (try recurring events for a bit) and hasn't seen much work in the past several years (IMO). The API available to Google Apps for Education institutions provides ample functionality in order to publish Moodle course events to a Google "course" calendar which can easily be automatically shared with all course participants (and their parents, if not in Higher Ed).

Bob Puffer
added a comment - 17/Jun/11 10:27 PM Sorry to be so contrary and at so late a date but I believe this is the wrong direction. Seems like we're protecting the walled garden and not considering how we can make Moodle resources (events) available in state-of-the-art tools used by others. In the Midwest US (where I'm from) I'm seeing many schools, K-12 and higher ed going to Google Apps for Education. The calendar functionality in Google works tremendously and sharing infrastructure is already in-place. Moodle's calendar has major flaws (try recurring events for a bit) and hasn't seen much work in the past several years (IMO). The API available to Google Apps for Education institutions provides ample functionality in order to publish Moodle course events to a Google "course" calendar which can easily be automatically shared with all course participants (and their parents, if not in Higher Ed).

Hi Bob,
Just want to be sure the original intent of this ticket is not lost. The current Moodle calendar can already both be subscribed to and imported into Google calendar, Outlook, or anywhere that accepts ICS/ical feeds (out-going). The purpose here is to establish the reverse direction as well - so that the Moodle calendar can either import or subscribe to a Google calendar (or other ICS/ical file/feed from any other app). Having uni-directional functionality is limiting and is seemingly against standards (ics/ical in/out as Outlook/Google and other calendar programs have). I (and I believe the others who have voted for and commented in favor of this ticket) would simply like to be able to subscribe in Moodle to a campus calendar that is already in existence in another app (regardless of update frequency) so that we don't have to duplicate effort to get these events into Moodle. I respectfully suggest that proposed improvements to other Moodle calendar functionality (such as recurring events) be added in a separate ticket.

Clark Shah-Nelson
added a comment - 17/Jun/11 10:48 PM Hi Bob,
Just want to be sure the original intent of this ticket is not lost. The current Moodle calendar can already both be subscribed to and imported into Google calendar, Outlook, or anywhere that accepts ICS/ical feeds (out-going). The purpose here is to establish the reverse direction as well - so that the Moodle calendar can either import or subscribe to a Google calendar (or other ICS/ical file/feed from any other app). Having uni-directional functionality is limiting and is seemingly against standards (ics/ical in/out as Outlook/Google and other calendar programs have). I (and I believe the others who have voted for and commented in favor of this ticket) would simply like to be able to subscribe in Moodle to a campus calendar that is already in existence in another app (regardless of update frequency) so that we don't have to duplicate effort to get these events into Moodle. I respectfully suggest that proposed improvements to other Moodle calendar functionality (such as recurring events) be added in a separate ticket.

Again, I apologize Clark for any lapses in my understanding of Moodle's calendar functionality. As I understand it, Moodle does not export calendars by course to separate URLs which would not provide the functionality I described. A quick check on the Tracker indicates how important (NOT!!) the calendar is in Moodle's overall scheme. It appears that mostly the few things that got fixes out of the enormous number of issues filed had to do with lost functionality in some other portion of Moodle. I might mention again that on the reverse side, when you'd like to have Google export a calendar to iCal, you are even worse off in wondering exactly when its going to happen (maybe anything that starts with a small 'i' isn't on their priority list). I agree with you that the original issue (filed two years ago) was to be able to easily import a campus academic calendar (or some such) into Moodle courses or as Global events and that intent is still a good one – its just far afield from where I believe this issue has headed in the mean time and seems to put a bandaid where a tourniquet might be a better resolution.

Bob Puffer
added a comment - 17/Jun/11 11:33 PM Again, I apologize Clark for any lapses in my understanding of Moodle's calendar functionality. As I understand it, Moodle does not export calendars by course to separate URLs which would not provide the functionality I described. A quick check on the Tracker indicates how important (NOT!!) the calendar is in Moodle's overall scheme. It appears that mostly the few things that got fixes out of the enormous number of issues filed had to do with lost functionality in some other portion of Moodle. I might mention again that on the reverse side, when you'd like to have Google export a calendar to iCal, you are even worse off in wondering exactly when its going to happen (maybe anything that starts with a small 'i' isn't on their priority list). I agree with you that the original issue (filed two years ago) was to be able to easily import a campus academic calendar (or some such) into Moodle courses or as Global events and that intent is still a good one – its just far afield from where I believe this issue has headed in the mean time and seems to put a bandaid where a tourniquet might be a better resolution.

Yes, given that this issue has 156 and the next highest voted item in the entire tracker has 97, and that it has been 2.5 years or so, it does make me question the relative importance and value of the tracker in the larger scheme of new features and improvements to Moodle.
(Then again, I've only contributed the idea, not the code... so I have plenty of time and patience. Looks like it might make it in by the time I convince the administration to switch from text to Google Calendar.

At any rate, I still haven't seen any specifics noted that either a) would cause me to not seek the functionality mentioned b) would cause me to unvote for this, c) would cause me to seek another direction or solution, or d) would make me not want to send the NZ Westlake Boys' High School and the Ministry of Education a cake! http://www.moodleinschools.org.nz/forum/topics/5067

I think we are getting close on this one.

(BTW, Bob, you are correct, that when exporting from Moodle to Google Calendar - the URL generated is specific to a user, and not a course. Students or instructors can generate a URL to subscribe to in Google calendar that displays their entire Moodle calendar among their google calendars (though only by week, month, or 60 days of upcoming events).

Clark Shah-Nelson
added a comment - 18/Jun/11 2:33 AM Yes, given that this issue has 156 and the next highest voted item in the entire tracker has 97, and that it has been 2.5 years or so, it does make me question the relative importance and value of the tracker in the larger scheme of new features and improvements to Moodle.
(Then again, I've only contributed the idea, not the code... so I have plenty of time and patience. Looks like it might make it in by the time I convince the administration to switch from text to Google Calendar.
At any rate, I still haven't seen any specifics noted that either a) would cause me to not seek the functionality mentioned b) would cause me to unvote for this, c) would cause me to seek another direction or solution, or d) would make me not want to send the NZ Westlake Boys' High School and the Ministry of Education a cake! http://www.moodleinschools.org.nz/forum/topics/5067
I think we are getting close on this one.
(BTW, Bob, you are correct, that when exporting from Moodle to Google Calendar - the URL generated is specific to a user, and not a course. Students or instructors can generate a URL to subscribe to in Google calendar that displays their entire Moodle calendar among their google calendars (though only by week, month, or 60 days of upcoming events).

Daniel Wahl
added a comment - 18/Jun/11 3:53 AM Clark please see MDL-22211 for a fix for viewing events further out than 60 day. Unfortunately this is only tested for 1.9, not 2.0 as I wrote it a year and a half ago.

+1 to throw away all the current date/time related + calendar code and start from scratch. This would also require some migration tool that fixes existing sites that use local server time. I personally do not think we could build any reliable solution on top of the current code.

Petr Skoda
added a comment - 15/Jul/11 10:04 PM +1 to throw away all the current date/time related + calendar code and start from scratch. This would also require some migration tool that fixes existing sites that use local server time. I personally do not think we could build any reliable solution on top of the current code.

I said that because there are problems with DST in our custom made date/time library, also we do not store the timezone information properly which creates major problems with repeated events. If you ignore timezones/DST and just use server time it works fine (at least for me), if you configure the DST/timezones then suddenly events are moved, cron events skipped, etc. If we are going to sync our calendar with something that does the things right I am afraid we are going to hit major problems because our & their is not going to match. Then we need to recalculate the server time to real UTC time for all existing data, we can not do it using incorrect routines. This should be done only once and properly, but it of course requires fully tested and working lib date/time support. Why replace the calendar UI code? It should use Ajax.

Nobody worked on calendar for many years (except some minor cleanup by Sam last year), since the migration to PHP 5.2.x I keep repeating we should do something with the date/time/calendar internals first. I do not see a point in implementing any kind of import/export of calendar events unless we fist make it do the maths properly.

Petr Skoda
added a comment - 18/Jul/11 2:48 PM I said that because there are problems with DST in our custom made date/time library, also we do not store the timezone information properly which creates major problems with repeated events. If you ignore timezones/DST and just use server time it works fine (at least for me), if you configure the DST/timezones then suddenly events are moved, cron events skipped, etc. If we are going to sync our calendar with something that does the things right I am afraid we are going to hit major problems because our & their is not going to match. Then we need to recalculate the server time to real UTC time for all existing data, we can not do it using incorrect routines. This should be done only once and properly, but it of course requires fully tested and working lib date/time support. Why replace the calendar UI code? It should use Ajax.
Nobody worked on calendar for many years (except some minor cleanup by Sam last year), since the migration to PHP 5.2.x I keep repeating we should do something with the date/time/calendar internals first. I do not see a point in implementing any kind of import/export of calendar events unless we fist make it do the maths properly.

It's probably not as big an issue to fix the timezone maths as you seem to think. RFC-4791 is pretty straightforward, and we should be able to force mdl_event table to store UTC in timestart, add a timezone field, and adjust calendar/lib.php code as and where necessary.

Jonathan Harker
added a comment - 19/Jul/11 11:24 AM It's probably not as big an issue to fix the timezone maths as you seem to think. RFC-4791 is pretty straightforward, and we should be able to force mdl_event table to store UTC in timestart, add a timezone field, and adjust calendar/lib.php code as and where necessary.

Yes, fixing the code is possible, but nobody was willing to do that. You need to also upgrade all existing events, module deadlines and any other dates have in code + modify formslib + deal with backup/restore and I am not sure what else comes up.

This can not be done in stable branch because it will require database and API changes. If somebody does not start coding now it will not be part of Moodle 2.2

I would really love to see all this fix and import/export working fine, thanks everybody for your participation!

Petr Skoda
added a comment - 19/Jul/11 3:39 PM Yes, fixing the code is possible, but nobody was willing to do that. You need to also upgrade all existing events, module deadlines and any other dates have in code + modify formslib + deal with backup/restore and I am not sure what else comes up.
This can not be done in stable branch because it will require database and API changes. If somebody does not start coding now it will not be part of Moodle 2.2
I would really love to see all this fix and import/export working fine, thanks everybody for your participation!

The intent of this ticket is a simple UI addition to import calendars in Moodle, alongside the existing export. Belly-aching about the quality of the calendar code, while justified, is irrelevant. Petr, if you're seriously recommending throwing out all the calendar code and starting again, then that's a separate ticket for moodle 2 dev. If this is going to happen, then close this ticket and put us all out of our misery. Otherwise, I have a straightforward patch to 2.0 that works that should be easily compressed and rebased.http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/feature-20-importcalendar

Jonathan Harker
added a comment - 22/Nov/11 6:32 AM The intent of this ticket is a simple UI addition to import calendars in Moodle, alongside the existing export. Belly-aching about the quality of the calendar code, while justified, is irrelevant. Petr, if you're seriously recommending throwing out all the calendar code and starting again, then that's a separate ticket for moodle 2 dev. If this is going to happen, then close this ticket and put us all out of our misery. Otherwise, I have a straightforward patch to 2.0 that works that should be easily compressed and rebased.
http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=shortlog;h=refs/heads/feature-20-importcalendar

Adding Michael to this (HQ Dev manager) - Michael can you please provide some feedback here? - when is HQ planning to rewrite calendar? - if it's longer than 12months away can we at least get something like this feature in?

also - attaching link to squashed rebased commit against master (Jonathan any chance you could check this to see if it looks ok?) - I've excluded the lib/bennu changes as it's been upgraded in 2.2 already.

Dan Marsden
added a comment - 23/Jan/12 6:56 AM Adding Michael to this (HQ Dev manager) - Michael can you please provide some feedback here? - when is HQ planning to rewrite calendar? - if it's longer than 12months away can we at least get something like this feature in?
also - attaching link to squashed rebased commit against master (Jonathan any chance you could check this to see if it looks ok?) - I've excluded the lib/bennu changes as it's been upgraded in 2.2 already.

This feature (import) and a much improved interface for adding events - is my teachers problem #1 with Moodle.
We are running three installations for around 3000 teachers and students.
(We are updating to 2.2+ from 2.0.4 this week, so a 1.9 version is not going to make it)

chester folming
added a comment - 24/Jan/12 8:31 PM This feature (import) and a much improved interface for adding events - is my teachers problem #1 with Moodle.
We are running three installations for around 3000 teachers and students.
(We are updating to 2.2+ from 2.0.4 this week, so a 1.9 version is not going to make it)
Could anybody confirm that ical-import comes with 2.3?

Hi Chester, "improved interface for adding events" is probably a different bug in the tracker - there have been discussions around replacing/rewriting the calendar functionality in Moodle but this hasn't been added to any development plan yet (that I've seen)

This code doesn't come with 2.3 at this stage - but I'm hoping HQ will look at this and make a decision either way - close as won't fix in the current calendar feature and do this when calendar is rewritten/replaced or agree for a patch to go into the existing calendar feature.

Dan Marsden
added a comment - 25/Jan/12 5:39 AM Hi Chester, "improved interface for adding events" is probably a different bug in the tracker - there have been discussions around replacing/rewriting the calendar functionality in Moodle but this hasn't been added to any development plan yet (that I've seen)
This code doesn't come with 2.3 at this stage - but I'm hoping HQ will look at this and make a decision either way - close as won't fix in the current calendar feature and do this when calendar is rewritten/replaced or agree for a patch to go into the existing calendar feature.

important to note that the patch provided here works as-is but isn't quite ready for Moodle core inclusion - we don't plan to spend time on this cleaning it up unless we get some form of commitment from HQ that it's possible this can go into core.

it needs a few small tidy ups related to coding guidelines - it includes a couple of patches for calendar core files that have bugs that cause the import to fail - it's possible these core changes could be handled differently (I don't think we maintain core changes to yui code)

Dan Marsden
added a comment - 25/Jan/12 11:13 AM important to note that the patch provided here works as-is but isn't quite ready for Moodle core inclusion - we don't plan to spend time on this cleaning it up unless we get some form of commitment from HQ that it's possible this can go into core.
it needs a few small tidy ups related to coding guidelines - it includes a couple of patches for calendar core files that have bugs that cause the import to fail - it's possible these core changes could be handled differently (I don't think we maintain core changes to yui code)

This branch has a squashed commit similar to Dan's - but with the constants and language strings moved (and renamed) to the local/importcalendar code, the two other bugs removed (for now) as they should probably be dealt with separately.

Jonathan Harker
added a comment - 31/Jan/12 10:35 AM This branch has a squashed commit similar to Dan's - but with the constants and language strings moved (and renamed) to the local/importcalendar code, the two other bugs removed (for now) as they should probably be dealt with separately.

chester folming
added a comment - 20/Feb/12 11:39 PM Hi Dan and Jonathan
Importing an ics file to the personal calendar works with the patch I downloaded - is there a way of importing the ics file into a course?
Right now if I am a teacher, I can only import into my own personal calendar, and if I am an admin, I can only import into the global or the personal calendar.
However the most useful function would be to import into the course calendar..
(I've made sure that the permission for the teacher role has all calendar permissions allowed).
Best Regards and thanx for your work on this issue
Chester Folming

I think many do not understand why calendar import is such an important issue.
Teachers and students all have smart phones, and they are expecting to be able to view their calendar on these devices. However calendars are often partly made elsewhere in other systems, and this information will never get to Moodle unless import to the course is possible.

With the new mobile interface (and hopefully also soon integrated in the great My Moodle app) calendar upgrades are the single most missing thing. Import could bring the information into Moodle, which is step one in this process (IMO).

It would be nice to have some comments from the people who decides what goes into core, this issue (MDL-16660) is well voted for, and has been around for a while..

Anyhow thank you for all the good work - I am not loosing sight of all the great new improvements

chester folming
added a comment - 27/Feb/12 2:59 AM I think many do not understand why calendar import is such an important issue.
Teachers and students all have smart phones, and they are expecting to be able to view their calendar on these devices. However calendars are often partly made elsewhere in other systems, and this information will never get to Moodle unless import to the course is possible.
With the new mobile interface (and hopefully also soon integrated in the great My Moodle app) calendar upgrades are the single most missing thing. Import could bring the information into Moodle, which is step one in this process (IMO).
It would be nice to have some comments from the people who decides what goes into core, this issue ( MDL-16660 ) is well voted for, and has been around for a while..
Anyhow thank you for all the good work - I am not loosing sight of all the great new improvements

While I still agree that calendar importing is an important feature, I think it's dangerous to assume that "Teachers and students all have smart phones" - ours certainly don't. However they still want to be able to import calendars as they want to have access to all institutional data through one system, and since so much of it's already in Moodle it makes sense for that to be the system.

Mark Johnson
added a comment - 28/Feb/12 4:38 PM While I still agree that calendar importing is an important feature, I think it's dangerous to assume that "Teachers and students all have smart phones" - ours certainly don't. However they still want to be able to import calendars as they want to have access to all institutional data through one system, and since so much of it's already in Moodle it makes sense for that to be the system.

Thank you for the reply on calendar import, and why this is important in relation to access from smart phones.

We give the teachers iphones (95%) and androids (5%). So they all have smart phones.
Our log indicate that 40% of students daily uses a smart phone to check their mail. So the percentage is probably somewhat higher, since you have to download an app for this.

I wrote earlier, that the teachers have to be able to import calender files to a course calendar, and not just to his or hers private calendar. As it is today students and teacher shares calendars at google - which means they have to go to two systems. Which also means that they are driven away from Moodle, where everything should be accessible.

chester folming
added a comment - 29/Feb/12 1:05 AM Thank you for the reply on calendar import, and why this is important in relation to access from smart phones.
We give the teachers iphones (95%) and androids (5%). So they all have smart phones.
Our log indicate that 40% of students daily uses a smart phone to check their mail. So the percentage is probably somewhat higher, since you have to download an app for this.
I wrote earlier, that the teachers have to be able to import calender files to a course calendar, and not just to his or hers private calendar. As it is today students and teacher shares calendars at google - which means they have to go to two systems. Which also means that they are driven away from Moodle, where everything should be accessible.

Last time I tested this, you could add subscriptions to the course calendar or any groups you were in (as long as you had the permissions to edit the course or group calendar in question). If you don't see those options in the event type drop-down, can you let me know what version of Moodle you are testing it in? It may be that the code to set that up (importcalendar_get_eventtype_choices function in local/importcalendar/lib.php) has changed since we were testing it in 2.0

Jonathan Harker
added a comment - 01/Mar/12 1:03 PM Hi chester,
Last time I tested this, you could add subscriptions to the course calendar or any groups you were in (as long as you had the permissions to edit the course or group calendar in question). If you don't see those options in the event type drop-down, can you let me know what version of Moodle you are testing it in? It may be that the code to set that up (importcalendar_get_eventtype_choices function in local/importcalendar/lib.php) has changed since we were testing it in 2.0

chester folming
added a comment - 01/Mar/12 6:04 PM Hi Jonathan
Thank you for taking the time to reply.
Our installation works in relation to importing into the personal calendar and if you are an admin - to the global calendar..
We have installed from:
http://git.catalyst.net.nz/gw?p=moodle-r2.git;a=commitdiff;h=5cb9820e1da0c8c31ba9d1d2e15132f073616be6
(I installed the patch by replacing the view.php file in the calendar dir and created the file structure for the other six php-files and placed files accordingly)
Our Moodle version is: Moodle 2.2.1+ (Build: 20120202)
It does not seem to be a matter of permissions, since a teacher can create new events in the course calendar, but not import to it via the patch.

chester folming
added a comment - 06/Mar/12 9:37 PM Hi Jonathan
On the matter of not being able to import calendar to course on a new installation Moodle (2.2.1+):
I tried to see if I could find the problem you implied above, but I had no success.
Is there any hope that you can find time to look into the problem..?

Has there been any resolution to this? I am looking at Moodle 2.2 and don't see where importing a calendar is an option? As the administrator, I would like to be able to import a calendar rather than having to reinput all of the information again. I would be even better if I could just like it to the google calendar and have it update automatically. Any solution to any of this?

Christine Wilson
added a comment - 08/Mar/12 4:37 AM Has there been any resolution to this? I am looking at Moodle 2.2 and don't see where importing a calendar is an option? As the administrator, I would like to be able to import a calendar rather than having to reinput all of the information again. I would be even better if I could just like it to the google calendar and have it update automatically. Any solution to any of this?

The Calendar import patch is working in principle and is very easy to install.
However the import to course and group calendar seems not to be working on a new (Build: 20120202) installation, see above.
This is a serious problem if true, since it is the main functionality..

You should notice (Christine) I am the only one to report this problem, which according to Jonathan might be related to us running a rather new install of Moodle.
(Or me being stupid in a not yet disclosed way )
If others can/cannot reproduce the problem on a new installation - I would like to know - I tried twice on different new servers, with the same result.

chester folming
added a comment - 08/Mar/12 7:47 PM - edited The Calendar import patch is working in principle and is very easy to install.
However the import to course and group calendar seems not to be working on a new (Build: 20120202) installation, see above.
This is a serious problem if true, since it is the main functionality..
You should notice (Christine) I am the only one to report this problem, which according to Jonathan might be related to us running a rather new install of Moodle.
(Or me being stupid in a not yet disclosed way )
If others can/cannot reproduce the problem on a new installation - I would like to know - I tried twice on different new servers, with the same result.

I've amended this MDL-16660 code to account for a change in the Moodle calendar API in 2.1 onwards, which improves the calendar's course interaction by requiring a course ID parameter rather than fishing it out of the PHP session. I have re-done the all-in-one commit for the master (2.3 dev) candidate branch which includes the fix, as well as added branches for 2.1 and 2.2 folks for convenience. Since the fix is *not required for Moodle 2.0, I have also added a 2.0 branch, which does not include it.

Note that the 2.0, 2.1 and 2.2 branches are provided for the convenience of users of stable versions, and contain two extra optional commits that fix minor calendar bugs. These are not included in the proposed patch for 2.3 dev above.

Jonathan Harker
added a comment - 09/Mar/12 7:18 AM Hi-
I've amended this MDL-16660 code to account for a change in the Moodle calendar API in 2.1 onwards, which improves the calendar's course interaction by requiring a course ID parameter rather than fishing it out of the PHP session. I have re-done the all-in-one commit for the master (2.3 dev) candidate branch which includes the fix, as well as added branches for 2.1 and 2.2 folks for convenience. Since the fix is *not required for Moodle 2.0, I have also added a 2.0 branch, which does not include it.
Note that the 2.0, 2.1 and 2.2 branches are provided for the convenience of users of stable versions, and contain two extra optional commits that fix minor calendar bugs. These are not included in the proposed patch for 2.3 dev above.

The import calendar patch works on Moodle 2.2.1 with the changes you made, thank you very much Jonathan Harker.
This integrates the calendar on Moodle with our smart phone users - again thank you very much!

I cannot stress how important it is for us to have this functionality in Moodle.
I hope that this functionality soon will be part of core (yes I voted for it).

chester folming
added a comment - 09/Mar/12 7:43 PM The import calendar patch works on Moodle 2.2.1 with the changes you made, thank you very much Jonathan Harker.
This integrates the calendar on Moodle with our smart phone users - again thank you very much!
I cannot stress how important it is for us to have this functionality in Moodle.
I hope that this functionality soon will be part of core (yes I voted for it).

yeah - I was talking with Jonathan about this earlier - we weren't sure "where" that code should end up but it was left there for easy install until planned inclusion in core - where do you think it should go? - I wondered if admin/tools would be a good place but it's not really restricted to admin users.

Dan Marsden
added a comment - 03/Apr/12 11:09 AM yeah - I was talking with Jonathan about this earlier - we weren't sure "where" that code should end up but it was left there for easy install until planned inclusion in core - where do you think it should go? - I wondered if admin/tools would be a good place but it's not really restricted to admin users.

I've successfully installed these patches on a Moodle 2.2 installation and mostly this looks excellent with our Google calendar events. However I have a permissions issue (the calendar permissions are set at their defaults). Our Moodle is login-only i.e. no guests. I have added a calendar at site level, and my 'test user' with ordinary privileges sees the calendar and what I would expect in the import dropdown menu i.e. user events only if they enter the calendar from the front page (whereas I, as admin, see the option to import to both user and global events). This user is also (correctly) unable to edit any individual events, whereas I as admin am able to do so. However the authorised user IS able to see and use both the update and the remove buttons in the list of calendars. When they click 'remove', the globally-added calendar disappears site-wide, for all users. This does not seem to be the expected behaviour, and it is certainly not desirable! I'm not really a coder - I might be able to fix this for my own site but doubt that I could deal with it in a way robust enough to create a more widely usable patch. Could someone more competent that me look into this? Thanks!

Erica Bithell
added a comment - 27/Apr/12 5:07 AM I've successfully installed these patches on a Moodle 2.2 installation and mostly this looks excellent with our Google calendar events. However I have a permissions issue (the calendar permissions are set at their defaults). Our Moodle is login-only i.e. no guests. I have added a calendar at site level, and my 'test user' with ordinary privileges sees the calendar and what I would expect in the import dropdown menu i.e. user events only if they enter the calendar from the front page (whereas I, as admin, see the option to import to both user and global events). This user is also (correctly) unable to edit any individual events, whereas I as admin am able to do so. However the authorised user IS able to see and use both the update and the remove buttons in the list of calendars. When they click 'remove', the globally-added calendar disappears site-wide, for all users. This does not seem to be the expected behaviour, and it is certainly not desirable! I'm not really a coder - I might be able to fix this for my own site but doubt that I could deal with it in a way robust enough to create a more widely usable patch. Could someone more competent that me look into this? Thanks!

Derek Chirnside
added a comment - 19/May/12 7:37 AM @Dan and @Martin.
technically speaking, what is wrong if this is a 'local' plugin? What is the difference between a local and a non-local plugin?
-Derek

The local plugins area is, by definition, reserved for generic plugins created locally on a site. It's not a place for core functionality. Admins need a safe place for such custom stuff and that is it.

It's not even intended for plugins that are to be shared (there are 25 other places for those) but even so, some do:

Martin Dougiamas
added a comment - 20/May/12 7:44 PM - edited The local plugins area is, by definition, reserved for generic plugins created locally on a site. It's not a place for core functionality. Admins need a safe place for such custom stuff and that is it.
It's not even intended for plugins that are to be shared (there are 25 other places for those) but even so, some do:
http://moodle.org/plugins/browse.php?list=category&id=18

Martin - I'm not sure that I understand what you mean that local plugins are "not even intended for plugins that are to be shared". Would you mind giving an example or highlighting one that seems to make an appropriate use of the local plugins area and perhaps one that is less than ideal? Peace - Anthony

Anthony Borrow
added a comment - 21/May/12 12:13 AM Martin - I'm not sure that I understand what you mean that local plugins are "not even intended for plugins that are to be shared". Would you mind giving an example or highlighting one that seems to make an appropriate use of the local plugins area and perhaps one that is less than ideal? Peace - Anthony

Jonathan Harker
added a comment - 29/May/12 2:11 PM Just about done here - two questions, where do I put a calendar cron job, and shall I just update lib/db upgrade and install directly using the code from the XMLDB schema thingy?

I have an issue where imported events, from an ics import, will not remain in the calendar. After an hour or so they will disappear again. I would like to resolve the issue, and were thinking that the best solution would be to do a new install from your latest submission.

However we are on 2.2.1 (Build: 20120202) so I suppose I cannot use the newest MDL-16660_23_2 version?
We will not be able to update to 2.3 before the summer break..

Assuming MDL-16660_23_2 can only be installed on a 2.3 server, can you from my description above - tell what needs to be corrected on our server..?

chester folming
added a comment - 30/May/12 8:43 PM - edited Hi - Thank you for working hard on this!
I have an issue where imported events, from an ics import, will not remain in the calendar. After an hour or so they will disappear again. I would like to resolve the issue, and were thinking that the best solution would be to do a new install from your latest submission.
However we are on 2.2.1 (Build: 20120202) so I suppose I cannot use the newest MDL-16660 _23_2 version?
We will not be able to update to 2.3 before the summer break..
Assuming MDL-16660 _23_2 can only be installed on a 2.3 server, can you from my description above - tell what needs to be corrected on our server..?

Jonathan Harker
added a comment - 31/May/12 8:18 AM I'm not sure how much peer review it really needs since all I've done is
relocate the code from /local/importcalendar to /calendar/lib.php,
move the language strings into lang/en/calendar.php,
tweak the cron code in lib/cronlib.php to run the cron function now in calendar/lib.php,
move the db schema stuff to lib/db, and
test both a new install and an upgrade to make sure it works correctly, which it does.

I've had an initial look at this, mostly focusing on the code as it is there and not how it all works together and interacts. Note that i'm not that familiar with calendar other than I know its not a very pretty sight.. So some of these comments may be related to existing calendar things.

It seems like there are still a good few basic things (e.g. hardcoded english strings) which need to be looked at in order to get this ready to be core integrated.

One thing which was not immediately obvious to me is how this dealt with existing events, collisions, date changes and things? How does it deal with changes to event times etc?

Here are my notes about the code as it is (like I say, really focusing on the code as it is in my editor, rather than the wider picture):

calendar/lib.php:

This is against moodle coding style Not Moodle style require_once "{$CFG->libdir}/bennu/bennu.inc.php";

Note to self: I have a funny feeling that calendar/lib.php is included by the world and dog, is this additional bennu include gonna have a perf impact. Worth Checking the include stack?

calendar_get_eventtype_choices:

Missing proper phpdoc

$choices[1] is depdning on a SITEID of 1, that is not the case for all sites.

calendar_addsubscription_form{}

There are hardcoded english strings throughout this. Need to be converted to proper strings and get_string calls..

Use of optional param is highly unusual in a form like that. Should this be definition_after_data or a form item itself.

file_get_contents() won't use moodle settings for proxy etc. Needs to use a filelib function.

Inline javascript needs to be converted to a more modern style, rather than use this javascript popup, why not keep it simple and move this form to its own page? Then wed have a proper place to go after the import too.

calendar_add_icalendar_event{}

Uses PARAM_CLEAN where more specific cleaning can be done. From the definition of PARAM CLEAN is 'obsoleted, please use a more specific type of parameter.'

calendar_show_subscriptions

In general this function seems fairly unweildy

Again optional_param inline in functions is generally discouraged I don't know if this is necessary here.

Dan Poltawski
added a comment - 03/Sep/12 1:14 PM Hi Jonathan,
Once again, sorry for my slow feedback on this.
I've had an initial look at this, mostly focusing on the code as it is there and not how it all works together and interacts. Note that i'm not that familiar with calendar other than I know its not a very pretty sight.. So some of these comments may be related to existing calendar things.
It seems like there are still a good few basic things (e.g. hardcoded english strings) which need to be looked at in order to get this ready to be core integrated.
One thing which was not immediately obvious to me is how this dealt with existing events, collisions, date changes and things? How does it deal with changes to event times etc?
Here are my notes about the code as it is (like I say, really focusing on the code as it is in my editor, rather than the wider picture):
calendar/lib.php:
This is against moodle coding style Not Moodle style require_once "{$CFG->libdir}/bennu/bennu.inc.php";
Note to self: I have a funny feeling that calendar/lib.php is included by the world and dog, is this additional bennu include gonna have a perf impact. Worth Checking the include stack?
calendar_get_eventtype_choices:
Missing proper phpdoc
$choices [1] is depdning on a SITEID of 1, that is not the case for all sites.
calendar_addsubscription_form{}
There are hardcoded english strings throughout this. Need to be converted to proper strings and get_string calls..
Use of optional param is highly unusual in a form like that. Should this be definition_after_data or a form item itself.
file_get_contents() won't use moodle settings for proxy etc. Needs to use a filelib function.
Inline javascript needs to be converted to a more modern style, rather than use this javascript popup, why not keep it simple and move this form to its own page? Then wed have a proper place to go after the import too.
calendar_add_icalendar_event{}
Uses PARAM_CLEAN where more specific cleaning can be done. From the definition of PARAM CLEAN is 'obsoleted, please use a more specific type of parameter.'
calendar_show_subscriptions
In general this function seems fairly unweildy
Again optional_param inline in functions is generally discouraged I don't know if this is necessary here.
Variables with underscores is against Moodle coding style (See http://docs.moodle.org/dev/Coding_style#Variables )
There are hardcoded english strings throughout this. Need to be converted to proper strings and get_string calls..
I think you need to convert date -> userdate to get propre localised date
calendar_import_icalendar_events:
ini_set('max_execution_time', 300); -> set_time_limit()
Inline english algnugage strings
Needs a space after the foreach foreach($ical->components ['VEVENT'] as $event) {
calendar_update_subscription_events
Inline english language strings
calendar_cron
It'd be clearer if you took out the DB statement from inside the foreach (and be more moodle coding style compliant)
Also, when I was playing in DEBUG_DEVELOPER mode with this, I encountered a number of E_STRICT problems

This feature seems to have lost attention when moved from Moodle 2.3.2 to 2.3.3..?

Please put priority on this, not just because of the votes - probably a lot of administrators (like me) have said again and again to staff that this feature is coming. It has been a hope since 2008 - and it seems possible from what I read above.

It is so important and it has been increasingly important since the smart phone became popular..
Please don't forget this - I have lost a lot of credit from sharing the hope that this would be possible in Moodle 2.3.2.

My persistence on this subject might be annoying, but then please look at the votes for this feature.

chester folming
added a comment - 10/Oct/12 2:54 AM This feature seems to have lost attention when moved from Moodle 2.3.2 to 2.3.3..?
Please put priority on this, not just because of the votes - probably a lot of administrators (like me) have said again and again to staff that this feature is coming. It has been a hope since 2008 - and it seems possible from what I read above.
It is so important and it has been increasingly important since the smart phone became popular..
Please don't forget this - I have lost a lot of credit from sharing the hope that this would be possible in Moodle 2.3.2.
My persistence on this subject might be annoying, but then please look at the votes for this feature.

Martin Dougiamas
added a comment - 10/Oct/12 2:05 PM I have been telling everyone this is going to be in 2.4. FOr this to happen it needs to
a) have Dan's identified problems fixed. Jonathan are you able to do this?
b) be submitted for integration by next week so it gets in before code freeze.

I don't have time to finish this by next week, as I'm working on a DSpace repository plug-in for the next two weeks. However I have rebased the commit onto latest master and started to address some of the issues on a WIP commit on top - see the wip-jh-MDL-16660 branch.

I agree that the add/view/manage calendar subscriptions form(s) should be on their own page. I have to leave that for hopefully another dev (maybe at the Octoberhackfest?)

The rest of the E_STRICT errors I found are coming from lib/bennu, which is independent of this task, but should nevertheless be addressed; I'll create a separate task. How much of a showstopper is it?

Example

Non-static method Bennu::generate_guid() should not be called statically,
assuming $this from incompatible context in
/home/johnno/Projects/moodle/lib/bennu/iCalendar_properties.php on line 974

Jonathan Harker
added a comment - 12/Oct/12 8:03 AM I don't have time to finish this by next week, as I'm working on a DSpace repository plug-in for the next two weeks. However I have rebased the commit onto latest master and started to address some of the issues on a WIP commit on top - see the wip-jh-MDL-16660 branch.
I agree that the add/view/manage calendar subscriptions form(s) should be on their own page. I have to leave that for hopefully another dev (maybe at the Octoberhackfest?)
Things addressed:
lang strings extracted out
fixed E_STRICT error about uninitialised objects in calendar_show_subscriptions()
The rest of the E_STRICT errors I found are coming from lib/bennu, which is independent of this task, but should nevertheless be addressed; I'll create a separate task. How much of a showstopper is it?
Example
Non-static method Bennu::generate_guid() should not be called statically,
assuming $this from incompatible context in
/home/johnno/Projects/moodle/lib/bennu/iCalendar_properties.php on line 974
variable names fixed in calendar_show_subscriptions()
wayward foreach() now correctly spaced
userdate() now used in the subscription list
A few threadbare doc-strings updated
I didn't realise "doing {$this}" was frowned upon, changed
The Moodle download_file_contents() function now used to fetch external .ics URLs, respecting proxies etc.
use PARAM_NOTAGS instead of PARAM_CLEAN to sanitise the event strings
require_once, include, et al. are not functions, use of () unnecessary, but changed anyway
SITEID now used for global events
cron function tidied up
Bug: eventmanager.js - YUI was unnecessarily raising a fatal exception, killing all subsequent page Javascript execution. The error is handled further up the chain in initializer() anyway (line 19).

Just letting you know Martin asked me to check this out if I found a bit of time. I've started looking at it now and will produce a commit tidying up and fixing a couple of things based upon the branch you mentioned above wip-jh-MDL-16660.
I'll try have something up in the next couple of days so that we can get Dan to look again when he is back.
I'll ping you if I have any Q's about things.

Sam Hemelryk
added a comment - 12/Oct/12 12:09 PM Hi Jonathan,
Just letting you know Martin asked me to check this out if I found a bit of time. I've started looking at it now and will produce a commit tidying up and fixing a couple of things based upon the branch you mentioned above wip-jh- MDL-16660 .
I'll try have something up in the next couple of days so that we can get Dan to look again when he is back.
I'll ping you if I have any Q's about things.
Many thanks
Sam

Sam Hemelryk
added a comment - 15/Oct/12 4:44 PM Ok I think this is probably ready for a peer-review again:
Repo: git://github.com/samhemelryk/moodle.git
Branch: wip-MDL-16660-m24
Diff: https://github.com/samhemelryk/moodle/compare/wip-MDL-16660-m24
The following is copied from the commit message (notes what I've changed here):
Added a bit of AMOS to copy existing strings and save a little translation effort
Cleaned up fixed strings in several places
Cleaned up some existing strings as required.
Fixed install and upgrade code. Split upgrade into two parts (one for each table).
Fixed fatal error caused by missing forms lib inclusion
Added param types to forms.
Converted file_get_content to use curl for URL's.
Cleaned things up per coding style.
Separated subscription management and form into separate files.
Tidied up bennu inclusion to just where required.
Lots of other small fixes as well.
Cheers
Sam

Only a minor thing, but filelib has download_file_content($url) which does all the curl bit for you, respecting the Moodle proxy settings and whatnot, which saves you having to instantiate new curl() objects.

Jonathan Harker
added a comment - 16/Oct/12 10:22 AM Only a minor thing, but filelib has download_file_content($url) which does all the curl bit for you, respecting the Moodle proxy settings and whatnot, which saves you having to instantiate new curl() objects.

Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

Dan Poltawski
added a comment - 21/Oct/12 11:57 PM Sending all 'waiting for peer review' issues to integration before freeze, as agreed in Integrators Meeting 19/10/12. We are doing this to ensure any 'integratable issues' will not got missed before freeze..

Sam Hemelryk
added a comment - 30/Oct/12 12:34 PM Hi Dan, branch is back up there now. Not sure what went wrong there but I couldn't find it on my local machine either.
Luckily I was saved by git reflog. God bless git.

Thanks everyone for your work, input and votes on this issue, its integrated now!

There is still work left to be done though:

1/ We desperately need more testing instrucitons covering more paths for this feature (especially for QA tests). Help with the docs for this feature and heavy testing to iron out the kinks.

2/ As far as I can tell there is no indication of the source of the calendar events when imported. This means that event imported can be edited by the teacher, then updated again and then the teachers changes will be updated without warnings. We have the susbscriptionid in the DB, so I suppose this is an easy fix. As MD said "a little "ical" tag on all the events and no editing allowed". MDL-36276.

On the code:

I got rid of get_ical_data() as the code path for using download_file_content was never been called and would be different to the curl download path. It seemed simpler to remove and simplify the code.

$eventrecord->groupid = 0; // TODO: ???

I removed the translation of cronjob strings, since this is not required.

Dan Poltawski
added a comment - 30/Oct/12 3:37 PM - edited Thanks everyone for your work, input and votes on this issue, its integrated now!
There is still work left to be done though:
1/ We desperately need more testing instrucitons covering more paths for this feature (especially for QA tests). Help with the docs for this feature and heavy testing to iron out the kinks.
2/ As far as I can tell there is no indication of the source of the calendar events when imported. This means that event imported can be edited by the teacher, then updated again and then the teachers changes will be updated without warnings. We have the susbscriptionid in the DB, so I suppose this is an easy fix. As MD said "a little "ical" tag on all the events and no editing allowed". MDL-36276 .
On the code:
I got rid of get_ical_data() as the code path for using download_file_content was never been called and would be different to the curl download path. It seemed simpler to remove and simplify the code.
$eventrecord->groupid = 0; // TODO: ???
I removed the translation of cronjob strings, since this is not required.

Rajesh Taneja
added a comment - 31/Oct/12 2:39 PM Works Great Sam,
Few things which you might want to fix:
Poll interval can't be updated. Clicking update sets poll interval to never (0)
Add ical subscription with "Poll interval" to hourly
Change poll to weekly, and click update. Poll is set to never.
Poll interval is not disabled for Calender File . As there is no poll interval for file import, I think "Poll interval" should be disabled with "Calendar URL" field.
Unrelated issue (Just for reference): Event link on calender block have html (&) url, which never let user jump to correct event.
Passing this as the above problems are trivial and can be solved in another bug.

Helen Foster
added a comment - 03/Nov/12 1:23 AM I've just been checking out this new feature in order to write some QA tests for it. Great work everybody!
Raj, I noticed the same things as you with regard to the poll interval and so created MDL-36351 and MDL-36352 for them.

chester folming
added a comment - 03/Nov/12 6:00 PM Thank you so much guys, next week we will start our testing, maybe contributing to the new (spin off) issues.
This is a huge new improvement, thank you..!

Helen Foster
added a comment - 06/Nov/12 10:18 PM Just noting a couple of language string improvements added to en_fix, as agreed with Sam:
'Poll' and 'Poll interval' changed to 'Update' and 'Update interval' respectively to make them more easily understood.

I'm removing the qa_test_required label as this issue now has some QA tests: MDLQA-4580, MDLQA-4581, MDLQA-4593, MDLQA-4594 (Note that these are QA test master copies which will be cloned for upcoming QA cycles.)

The poll/update interval setting is not covered in a QA test, as I couldn't think of an easy way to test it.

If anyone thinks more QA tests are needed for this new feature, please comment and re-add the qa_test_required label.

Helen Foster
added a comment - 06/Nov/12 10:32 PM I'm removing the qa_test_required label as this issue now has some QA tests: MDLQA-4580 , MDLQA-4581 , MDLQA-4593 , MDLQA-4594 (Note that these are QA test master copies which will be cloned for upcoming QA cycles.)
The poll/update interval setting is not covered in a QA test, as I couldn't think of an easy way to test it.
If anyone thinks more QA tests are needed for this new feature, please comment and re-add the qa_test_required label.

chester folming
added a comment - 28/Jan/13 7:26 AM - edited Location is not imported to Moodle calendar, maybe there is a double import of calendar title..?
I added MDL-37624 which explains the problem, and double tested this with iCal (mac) and Gmail calendar.
Both iCal and Gmail calendar will show locaion from the same file.
A developer checked if he could make a local fix for us, but said the location information was not imported at all.

This thread seems to have a large group of administrators and core developers interested in the calendar functions.
I would like to ask your opinion on MDL-37624, and maybe be part of progressing this into development.
(I am myself the administrator of an installation of 4500 users and some 100+ teachers).

The problem:
Today location is missing in Moodle, both when creating a new event and when importing events (calendars) into Moodle. I think this needs to be solved since Moodle with import now can be part of a calendar flow.

Our staff creates calendars in their mail application, and some guest lecturers create them in gmail.
Some actually also create calendars in Moodle, but in all cases, communication to the full standard is not possible at this point. This is what would be important to get solved..

chester folming
added a comment - 31/Jan/13 9:13 PM - edited This thread seems to have a large group of administrators and core developers interested in the calendar functions.
I would like to ask your opinion on MDL-37624 , and maybe be part of progressing this into development.
(I am myself the administrator of an installation of 4500 users and some 100+ teachers).
The problem:
Today location is missing in Moodle, both when creating a new event and when importing events (calendars) into Moodle. I think this needs to be solved since Moodle with import now can be part of a calendar flow.
Our staff creates calendars in their mail application, and some guest lecturers create them in gmail.
Some actually also create calendars in Moodle, but in all cases, communication to the full standard is not possible at this point. This is what would be important to get solved..