Getting calendar: events core_calendar_get_calendar_events

Getting calendar: events core_calendar_get_calendar_events

by Oliver Obermayr -
Number of replies: 3

Hello everyone, after the upgrade of my moodle to 2.5dev version I'm trying to get calendar events using core_calendar_get_calendar_events function in url:

http://localhost/moodle-2.5dev/webservice/rest/server.php?wstoken=token_here&wsfunction=core_calendar_get_calendar_events

The result is just an empty xml file with KEY name="events" and KEY name="warnings". From Documents API I got that it needs to required parameter events, but have no idea how to use it, since the function is itself new. Any help would be appreciated.

Average of ratings: -
In reply to Oliver Obermayr

Re: Getting calendar: events core_calendar_get_calendar_events

by Pat Moss -

Hello Oliver,

I am experiencing the same problem.  Did you solve it?

 

In reply to Pat Moss

Re: Getting calendar: events core_calendar_get_calendar_events

by Farhan Karmali -
Picture of Core developers Picture of Plugin developers Picture of Testers

Am stuck here too sad


I am using wsfunction=core_calendar_get_calendar_events&events[courseids][1]=2&moodlewsrestformat=json


But I still get empty events, how do I get the site events?


edit: for anyone looking for solution make sure options[timeend]=1459728000 is set to a date in the future

In reply to Oliver Obermayr

Re: Getting calendar: events core_calendar_get_calendar_events

by Angus Denton -

Have you setup the webservice with the right protocols ?

Have you included the calendar functions you want into the name web service ?

Has the Webservice user got permission to access these functions

Is the rest protocol enabled...


Angus Denton