1

将moodle升级到2.5dev版本后,我试图在url中使用core_calendar_get_calendar_events函数获取日历事件:

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

结果只是一个空的 xml 文件,其中包含元素KEY name="events"KEY name="warnings". 从 Documents API 我得到它需要参数events,但不知道如何使用它,因为该函数本身是新的。任何帮助,将不胜感激。

4

1 回答 1

0

您想查看 ROOT/calendar/externallib.php - 这可能更准确地称为组件的 Web 服务库。查找函数get_calendar_events_parameters:这告诉您该函数需要两个参数。第一个参数“events”是一个带有“eventids”的数组,其中包含一个id数组;'courseids' 和 'groupids' 也是如此。

第二个参数是“options”,它是一个包含“userevents”(布尔)、“siteevents”(布尔)、“timestart”(整数)、“timeend”(整数)和“ignorehidden”(布尔)的数组。

所以函数调用应该是这样的:

$soap->core_calendar_get_calendar_events(array(array(1),array(2),array(3)), array(true, true, 0, 0, true));
于 2013-03-19T17:01:12.543 回答