Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 400] [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Raw event retrieval strategy.

Copyright: 2017 Cameron Ball <cameron@cameron1729.xyz>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 323 lines (14 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

raw_event_retrieval_strategy:: (2 methods):
  get_raw_events()
  get_raw_events_legacy_implementation()


Class: raw_event_retrieval_strategy  - X-Ref

Raw event retrieval strategy.

This strategy is based on what used to be the calendar API's get_events function.

get_raw_events(array $usersfilter = null,array $groupsfilter = null,array $coursesfilter = null,array $categoriesfilter = null,array $whereconditions = null,array $whereparams = null,$ordersql = null,$offset = null,$limitnum = null,$ignorehidden = true)   X-Ref
No description

get_raw_events_legacy_implementation($users,$groups,$courses,$categories,$whereconditions,$whereparams,$ordersql,$offset,$limitnum,$ignorehidden)   X-Ref
The legacy implementation with minor tweaks.

param: array|int|boolean $users array of users, user id or boolean for all/no user events
param: array|int|boolean $groups array of groups, group id or boolean for all/no group events
param: array|int|boolean $courses array of courses, course id or boolean for all/no course events
param: string $whereconditions The conditions in the WHERE clause.
param: array $whereparams The parameters for the WHERE clause.
param: string $ordersql The ORDER BY clause.
param: int $offset Offset.
param: int $limitnum Limit.
param: boolean $ignorehidden whether to select only visible events or all events
return: array $events of selected events or an empty array if there aren't any (or there was an error)