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.

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

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.

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

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

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

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

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

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

param: stdClass $glossary