Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -
Number of replies: 17

Hey there,

I've been using Scheduler for a while now and I usually export my Moodle website's calendar to Google. All my students' appointment used to be exported in the feed provided by the Moodle's calendar url.

Now, after I've upgraded to 3.3, my feed only displays course events, but nothing from the scheduler. Am I missing something or is it a bug?

Thanks,

Sébastien Petit

PS: my "export calendar" settings include "all events"

PS2: my I visit the "calendar" page, all events display fine (site / course / user) on Moodle, so it must be purely an export problem.

Average of ratings: -
In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Hello Sébastien

That's interesting. I just tried to reproduce it on my test installation, but for me it seemed to work fine. Likely it has something to do with your export settings.

I guess that you're using the "Get calendar URL" button, and you then enter that URL in Google Calendar? Can you maybe post the URL here? (Best to remove the "authtoken=..." part as it contains your credentials, but the other parameters in the URL would be interesting.)

Henning

In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

Hello Henning, thanks for investigating that strange quirk. Here's my URL:

http://nopainenogain.fr/calendar/export_execute.php?userid=37&authtoken=*removed*&preset_what=all&preset_time=custom

I tried to export when logged in as a teacher & then as admin, but same results...

EDIT1: Forgot to mention I had to upgrade my postgresql packages because they were outdated. I used the upgrade command to transfer the databases automatically and it reported that the import was successful - I haven't noticed any other "bug" since the upgrade to Moodle 3.3 / postgresql 9.6 (from 9.1) - should I check any particular table in my database for a bug??googlescreenshot calendar

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Hello Sébastien

It seems that your problem is indeed related to the calendar export, not to Scheduler itself (as the events are apparently written into the Moodle calendar). I tried to reproduce the problem but for me it all worked fine.

Just one thought that is more of a guess: It seems that you are using a custom date range for the export. What happens if you chose one of the standard options, e.g., "Recent and next 60 days", instead? That is, if in your URL you change "preset_time=custom" into "preset_time=recentupcoming", do you see any events then?


In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

Hello there,

I've been experimenting further: choosing other export options reports a correct url but does exactly the same thing - no visible events from scheduler.

I've used the "ical" button to download an ics file from moodle & imported it in outlook: everything works fine & ALL events appear in outlook.

Next idea: an error in the "export_execute.php" script???

Creating a new scheduler activity doesn't change anything.

I'm out of ideas after that (I have the whole summer to fix this, but still, this is a pain...)

It this related to this bug?

https://tracker.moodle.org/browse/MDL-55486


In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Good point about MDL-55486 - this may in fact be related. I must confess that I have not actually tried to import the data into Google Calendar, rather I directly had a look at the output of export_execute.php in the browser. (I'd have trouble testing directly with Google Calendar because my test instances are not public...)

Maybe there's something wrong in the .ics file (which export_execute produces) that Google Calendar chokes on? Can you have a look at the file in a text editor - or post it here (redacted if needed)? I saw a spurious debug message in the file on my machine - but this may just be me (I'm currently working on the latest 3.4dev).


In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

Hello Henning,

I'm back, with more time to try & solve the issue.

First, I didn't even know the script generated an ICS file :D I could've diagnosed it faster, thanks for the tip.

The ICS file does contain user events... so the export script doesn't really seem to be the culprit.

https://moodle.org/pluginfile.php/178361/mod_forum/post/1429438/icalexport.ics

My test user is called Guinea Pig - I used the scheduler to book a meeting on july 13 - Guinea Pig is visible in the ICS file but not in Google Calendar.

Very strange. A date problem maybe?? I can't find anything when I look up Guinea Pig in my google calendar (backward of forward in time).

Any clue now?

EDIT1: Dates look fine.

A permission problem of some kind then? Moodle level or server level???

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

Two new ideas:

- If it's Google Calendar's fault, then it's still unresolved after 3 years (caching issue):

https://productforums.google.com/forum/#!topic/calendar/ixQnzHmWDSk

- I see no difference between the ics syntax of a course event and those generated by the scheduler, except for the backslash character:

BEGIN:VEVENT
UID:1713@nopainenogain.fr
SUMMARY:Mock exam
DESCRIPTION:
CLASS:PUBLIC
LAST-MODIFIED:20170614T071041Z
DTSTAMP:20170622T071325Z
DTSTART;VALUE=DATE:20170713
DTEND;VALUE=DATE:20170714
CATEGORIES:Global events
END:VEVENT

BEGIN:VEVENT
UID:1715@nopainenogain.fr
SUMMARY:Meeting with your Student\, Guinea Pig
DESCRIPTION:Calendar TEST
CLASS:PUBLIC
LAST-MODIFIED:20170614T073026Z
DTSTAMP:20170622T071325Z
DTSTART:20170713T093000Z
DTEND:20170713T100000Z
CATEGORIES:American and British Civilization 2016-2017
END:VEVENT

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

This is really odd. I just tried to import your ICS file into my Google Calendar - but via the "import" feature (uploading the file), not via a Calendar URL. Result: It works - all 10 events show up on the calendar, including the meetings with Guinea Pig. Possibly this is really a strange quirk of Google's calendar synchronization?

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Rob Mills -

Hi, 

I am having the same problem with getting the url into google calendar. I have the same problem with the Apple Calendar when I add the url as a subscription. I does not see the personal events. 


Rob

In reply to Rob Mills

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

When you paste the URL directly into your browser's address bar, you will download your list of events as  file. Does this contain the user events?

In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

I can confirm that "importing" the ics file in Google Calendar works, with all events, but not when 'subscribing'

So what is wrong here? We can't be the only ones experimenting with such issues (it worked perfectly until the middle of last year). 

I didn't get any reply in the more general moodle forums and I don't know who to transfer the issue too...the fall term is getting closer :/

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

It's me again (not giving up)... I noticed that the scheduler produces course events, and not user events. Is that normal behaviour?

Second quirk I noticed on Moodle's calendar page: When I select a specific course instead of "all courses", the events generated by the scheduler still appear in any selected course (it shouldn't... other manually generated course events disappear when another course is selected).

Does this help?

S.Petit

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

EDIT1: The scheduler events seem to be user events after all, but are not color-coded properly? They show as pink (course events), not blue, but clicking the (blue) eye to hide user events hides them.

I'm...puzzled.

In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Bert van der Hooft -

I'm not sure if there is an answer to the bug that subscribing to the Moodle calendar works nice,  but is missing the scheduler appointments (which is an essential thing).


In reply to Bert van der Hooft

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

The problem is still not fixed in Moodle Core (MDL-58768) - any user-related events are currently missed out.

In reply to Sébastien Petit

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

Hello Sebatien (and all)

it turns out that this behaviour is (at least partially?) caused by a bug in Moodle Core: In Moodle 3.3, user events are missing from the export when the user is not currently logged in (in particular when Google, or another calendar client, fetches the ical export). See MDL-60213 and linked issues.

Note that the complete export will be shown when you are logged into Moodle via a browser and download the export from there.


In reply to Henning Bostelmann

Re: Scheduler not exporting events to Moodle's calendar feed? (after upgrade to 3.3)

by Sébastien Petit -

Good to know I wasn't crazy. Still unresolved in 3.4 unfortunately.