Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Entry caching for glossary filter.

Copyright: 2014 Petr Skoda
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 295 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

concept_cache:: (9 methods):
  cm_updated()
  reset_caches()
  reset_course_muc()
  reset_global_muc()
  reset_glossary()
  fetch_concepts()
  get_course_concepts()
  get_global_concepts()
  get_concepts()


Class: concept_cache  - X-Ref

Concept caching for glossary filter.

cm_updated(\core\event\course_module_updated $event)   X-Ref
Event observer, do not call directly.

param: \core\event\course_module_updated $event

reset_caches($phpunitreset = false)   X-Ref
Reset concept related caches.

param: bool $phpunitreset

reset_course_muc($courseid)   X-Ref
Reset the cache for course concepts.

param: int $courseid

reset_global_muc()   X-Ref
Reset the cache for global concepts.


reset_glossary($glossary)   X-Ref
Utility method to purge caches related to given glossary.

param: \stdClass $glossary

fetch_concepts(array $glossaries)   X-Ref
Fetch concepts for given glossaries.

return: array
param: int[] $glossaries

get_course_concepts($courseid)   X-Ref
Get all linked concepts from course.

return: array
param: int $courseid

get_global_concepts()   X-Ref
Get all linked global concepts.

return: array

get_concepts($courseid)   X-Ref
Get all concepts that should be linked in the given course.

return: array with two elements - array of glossaries and concepts for each glossary
param: int $courseid