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.

Differences Between: [Versions 310 and 400] [Versions 39 and 400]

This file adds support to rss feeds generation

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 210 lines (8 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 4 functions


Functions that are not part of a class:

glossary_rss_get_feed($context, $args)   X-Ref
Returns the path to the cached rss feed contents. Creates/updates the cache if necessary.

return: string the full path to the cached RSS feed directory. Null if there is a problem.
param: stdClass $context the context
param: array    $args    the arguments received in the url

glossary_rss_get_sql($glossary, $time=0)   X-Ref
The appropriate SQL query for the glossary items to go into the RSS feed

return: string the SQL query to be used to get the entried from the glossary table of the database
param: stdClass $glossary the glossary object
param: int      $time     check for items since this epoch timestamp

glossary_rss_newstuff($glossary, $time)   X-Ref
If there is new stuff in since $time this returns true
Otherwise it returns false.

return: bool true if there are new items
param: stdClass $glossary the glossary activity object
param: int      $time     epoch timestamp to compare new items against, 0 for everyting

glossary_rss_delete_file($glossary)   X-Ref
Given a glossary object, deletes all cached RSS files associated with it.

param: stdClass $glossary