Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Calendar external functions. More...
Static Public Member Functions | |
static | create_calendar_events ($events) |
Create calendar events. | |
static | create_calendar_events_parameters () |
Returns description of method parameters. | |
static | create_calendar_events_returns () |
Returns description of method result value. | |
static | delete_calendar_events ($events) |
Delete Calendar events. | |
static | delete_calendar_events_parameters () |
Returns description of method parameters. | |
static | delete_calendar_events_returns () |
Returns description of method result value. | |
static | get_allowed_event_types ($courseid=0) |
Get the type of events a user can create in the given course. | |
static | get_allowed_event_types_parameters () |
Returns description of method parameters. | |
static | get_allowed_event_types_returns () |
Returns description of method result value. | |
static | get_calendar_access_information ($courseid=0) |
Convenience function to retrieve some permissions information for the given course calendar. | |
static | get_calendar_access_information_parameters () |
Returns description of method parameters. | |
static | get_calendar_access_information_returns () |
Returns description of method result value. | |
static | get_calendar_action_events_by_course ( $courseid, $timesortfrom=null, $timesortto=null, $aftereventid=0, $limitnum=20, ?string $searchvalue=null) |
Get calendar action events for the given course. | |
static | get_calendar_action_events_by_course_parameters () |
Returns description of method parameters. | |
static | get_calendar_action_events_by_course_returns () |
Returns description of method result value. | |
static | get_calendar_action_events_by_courses (array $courseids, $timesortfrom=null, $timesortto=null, $limitnum=10, ?string $searchvalue=null) |
Get calendar action events for a given list of courses. | |
static | get_calendar_action_events_by_courses_parameters () |
Returns description of method parameters. | |
static | get_calendar_action_events_by_courses_returns () |
Returns description of method result value. | |
static | get_calendar_action_events_by_timesort ($timesortfrom=0, $timesortto=null, $aftereventid=0, $limitnum=20, $limittononsuspendedevents=false, $userid=null, ?string $searchvalue=null) |
Get calendar action events based on the timesort value. | |
static | get_calendar_action_events_by_timesort_parameters () |
Returns description of method parameters. | |
static | get_calendar_action_events_by_timesort_returns () |
Returns description of method result value. | |
static | get_calendar_day_view ($year, $month, $day, $courseid, $categoryid) |
Get data for the daily calendar view. | |
static | get_calendar_day_view_parameters () |
Returns description of method parameters. | |
static | get_calendar_day_view_returns () |
Returns description of method result value. | |
static | get_calendar_event_by_id ($eventid) |
Get calendar event by id. | |
static | get_calendar_event_by_id_parameters () |
Returns description of method parameters. | |
static | get_calendar_event_by_id_returns () |
Returns description of method result value. | |
static | get_calendar_events ($events=array(), $options=array()) |
Get Calendar events. | |
static | get_calendar_events_parameters () |
Returns description of method parameters. | |
static | get_calendar_events_returns () |
Returns description of method result value. | |
static | get_calendar_monthly_view ($year, $month, $courseid, $categoryid, $includenavigation, $mini, $day, ?string $view=null) |
Get data for the monthly calendar view. | |
static | get_calendar_monthly_view_parameters () |
Returns description of method parameters. | |
static | get_calendar_monthly_view_returns () |
Returns description of method result value. | |
static | get_calendar_upcoming_view ($courseid, $categoryid) |
Get data for the monthly calendar view. | |
static | get_calendar_upcoming_view_parameters () |
Returns description of method parameters. | |
static | get_calendar_upcoming_view_returns () |
Returns description of method result value. | |
static | get_timestamps ($datetimes) |
Convert the specified dates into unix timestamps. | |
static | get_timestamps_parameters () |
Describes the parameters for get_timestamps. | |
static | get_timestamps_returns () |
Describes the timestamps return format. | |
static | submit_create_update_form ($formdata) |
Handles the event form submission. | |
static | submit_create_update_form_parameters () |
Returns description of method parameters. | |
static | submit_create_update_form_returns () |
Returns description of method result value. | |
static | update_event_start_day ($eventid, $daytimestamp) |
Change the start day for the given calendar event to the day that corresponds with the provided timestamp. | |
static | update_event_start_day_parameters () |
Returns description of method parameters. | |
static | update_event_start_day_returns () |
Returns description of method result value. | |
Calendar external functions.
|
static |
Create calendar events.
array | $events | A list of events to create. |
array | array of events created. |
moodle_exception | if user doesnt have the permission to create events. |
|
static |
Returns description of method parameters.
external_function_parameters. |
|
static |
Returns description of method result value.
core_external\external_description. |
|
static |
Delete Calendar events.
array | $eventids | A list of event ids with repeat flag to delete |
null |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get the type of events a user can create in the given course.
int | $courseid | Course to check, empty for site. |
array | The types allowed |
moodle_exception |
|
static |
Returns description of method parameters.
external_function_parameters. |
|
static |
Returns description of method result value.
core_external\external_description. |
|
static |
Convenience function to retrieve some permissions information for the given course calendar.
int | $courseid | Course to check, empty for site. |
array | The access information |
moodle_exception |
|
static |
Returns description of method parameters.
external_function_parameters. |
|
static |
Returns description of method result value.
core_external\external_description. |
|
static |
Get calendar action events for the given course.
int | $courseid | Only events in this course |
null | int | $timesortfrom | Events after this time (inclusive) |
null | int | $timesortto | Events before this time (inclusive) |
null | int | $aftereventid | Get events with ids greater than this one |
int | $limitnum | Limit the number of results to this value |
string | null | $searchvalue | The value a user wishes to search against |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get calendar action events for a given list of courses.
array | $courseids | Only include events for these courses |
null | int | $timesortfrom | Events after this time (inclusive) |
null | int | $timesortto | Events before this time (inclusive) |
int | $limitnum | Limit the number of results per course to this value |
string | null | $searchvalue | The value a user wishes to search against |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get calendar action events based on the timesort value.
null | int | $timesortfrom | Events after this time (inclusive) |
null | int | $timesortto | Events before this time (inclusive) |
null | int | $aftereventid | Get events with ids greater than this one |
int | $limitnum | Limit the number of results to this value |
null | int | $userid | The user id |
string | null | $searchvalue | The value a user wishes to search against |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get data for the daily calendar view.
int | $year | The year to be shown |
int | $month | The month to be shown |
int | $day | The day to be shown |
int | $courseid | The course to be included |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get calendar event by id.
int | $eventid | The calendar event id to be retrieved. |
array | Array of event details |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get Calendar events.
array | $events | A list of events |
array | $options | various options |
array | Array of event details |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get data for the monthly calendar view.
int | $year | The year to be shown |
int | $month | The month to be shown |
int | $courseid | The course to be included |
int | $categoryid | The category to be included |
bool | $includenavigation | Whether to include navigation |
bool | $mini | Whether to return the mini month view or not |
int | $day | The day we want to keep as the current day |
string | null | $view | The view mode for the calendar. |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Get data for the monthly calendar view.
int | $courseid | The course to be included |
int | $categoryid | The category to be included |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |
|
static |
Convert the specified dates into unix timestamps.
array | $datetimes | Array of arrays containing date time details, each in the format: ['year' => a, 'month' => b, 'day' => c, 'hour' => d (optional), 'minute' => e (optional), 'key' => 'x' (optional)] |
array | Provided array of dates converted to unix timestamps |
moodle_exception | If one or more of the dates provided does not convert to a valid timestamp. |
|
static |
Describes the parameters for get_timestamps.
external_function_parameters |
|
static |
Describes the timestamps return format.
external_single_structure |
|
static |
Handles the event form submission.
string | $formdata | The event form data in a URI encoded param string |
array | The created or modified event |
moodle_exception |
|
static |
Returns description of method parameters.
external_function_parameters. |
|
static |
Returns description of method result value.
core_external\external_description. |
|
static |
Change the start day for the given calendar event to the day that corresponds with the provided timestamp.
The timestamp only needs to be anytime within the desired day as only the date data is extracted from it.
The event's original time of day is maintained, only the date is shifted.
int | $eventid | Id of event to be updated |
int | $daytimestamp | Timestamp for the new start day |
array |
|
static |
Returns description of method parameters.
external_function_parameters |
|
static |
Returns description of method result value.
core_external\external_description |