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.

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.

param: int[] $glossaries
return: array

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

param: int $courseid
return: array

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.

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