Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

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

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