Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 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: 385 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

raw_event_retrieval_strategy:: (3 methods):
  get_raw_events()
  get_raw_events_legacy_implementation()
  subquerytimeconditions()


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: array $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)

subquerytimeconditions(string $prefix, array $conditions, array $params)   X-Ref
Returns a query fragment and params, with time constraints applied

param: string $prefix
param: array $conditions
param: array $params
return: array [<where>, <params>]