(no description)
File Size: | 304 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
coursecat:: (15 methods):
__construct()
get_short_name()
get_level_name()
get_context_name()
get_url()
get_instance_table()
get_behat_reference_columns()
get_compatible_role_archetypes()
get_possible_parent_levels()
get_capabilities()
instance()
get_child_contexts()
create_level_instances()
get_cleanup_sql()
build_paths()
__construct(stdClass $record) X-Ref |
Please use \core\context\coursecat::instance($coursecatid) if you need the instance of context. Alternatively if you know only the context id use \core\context::instance_by_id($contextid) param: stdClass $record |
get_short_name() X-Ref |
Returns short context name. return: string |
get_level_name() X-Ref |
Returns human readable context level name. return: string the human readable context level name. |
get_context_name($withprefix = true, $short = false, $escape = true) X-Ref |
Returns human readable context identifier. param: boolean $withprefix whether to prefix the name of the context with Category param: boolean $short does not apply to course categories param: boolean $escape Whether the returned name of the context is to be HTML escaped or not. return: string the human readable context name. |
get_url() X-Ref |
Returns the most relevant URL for this context. return: moodle_url |
get_instance_table() X-Ref |
Returns context instance database name. return: string|null table name for all levels except system. |
get_behat_reference_columns() X-Ref |
Returns list of columns that can be used from behat to look up context by reference. return: array list of column names from instance table |
get_compatible_role_archetypes() X-Ref |
Returns list of all role archetypes that are compatible with role assignments in context level. return: int[] |
get_possible_parent_levels() X-Ref |
Returns list of all possible parent context levels. return: int[] |
get_capabilities(string $sort = self::DEFAULT_CAPABILITY_SORT) X-Ref |
Returns array of relevant context capability records. param: string $sort return: array |
instance($categoryid, $strictness = MUST_EXIST) X-Ref |
Returns course category context instance. param: int $categoryid id from {course_categories} table param: int $strictness return: coursecat|false context instance |
get_child_contexts() X-Ref |
Returns immediate child contexts of category and all subcategories, children of subcategories and courses are not returned. return: array |
create_level_instances() X-Ref |
Create missing context instances at course category context level |
get_cleanup_sql() X-Ref |
Returns sql necessary for purging of stale context instances. return: string cleanup SQL |
build_paths($force) X-Ref |
Rebuild context paths and depths at course category context level. param: bool $force |