See Release Notes
Long Term Support Release
(no description)
File Size: | 204 lines (7 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
filter:: (7 methods):
__construct()
get_course_sql()
validate_filters()
has_course_filters()
can_access()
has_capability_in_context()
get_errormessage()
__construct(int $courseid = 0, int $categoryid = 0, string $tab = '',int $page = 0, int $perpage = 0, string $url = '', string $target = '') X-Ref |
filter constructor. param: int $courseid param: int $categoryid param: string $tab param: int $page param: int $perpage param: string $url param: string $target |
get_course_sql(string $alias = '', bool $onlycondition = false) X-Ref |
Get any course and category sql fragment and parameters and return as an array for this filter. Return false if course filters are invalid. param: string $alias Optional field alias to prefix on the where condition. param: bool $onlycondition Set to true if this is the only condition to be used in the SQL statement. return: array|bool |
validate_filters() X-Ref |
Validate the filters. Set an errormessage if invalid. No filters is also valid - in that case using entire system. return: bool |
has_course_filters() X-Ref |
Return true if filter has course filter data, and the data is valid. Note that the site uses courseid 1. return: bool |
can_access(\context $context = null, string $capability = '') X-Ref |
Check whether the user has appropriate permissions on the supplied context. Determine the capability to check by the filters that are set. param: \context|null $context The context being viewed (e.g. system, course category, course). param: string $capability An optional capability to check. return: bool |
has_capability_in_context(string $capability, \context $context = null) X-Ref |
Check the specified capability against the filter's context, or the specified context with the filter's information. param: string $capability param: null $context return: bool |
get_errormessage() X-Ref |
Return the error message data. return: mixed |