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 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

This file contains all the common stuff to be used for RSS in the Database Module

Copyright: 1999 onwards Martin Dougiamas {@link http://moodle.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 193 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:

data_rss_get_feed($context, $args)   X-Ref
Generates the Database modules RSS Feed

param: strClass $context the context the feed should be created under
param: array $args array of arguments to be used in the creation of the RSS Feed
return: NULL|string NULL if there is nothing to return, or the file path of the cached file if there is

data_rss_get_sql($data, $time=0)   X-Ref
Creates and returns a SQL query for the items that would be included in the RSS Feed

param: stdClass $data database instance object
param: int      $time epoch timestamp to compare time-modified to, 0 for all or a proper value
return: string SQL query string to get the items for the databse RSS Feed

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

param: stdClass $data the data activity object
param: int      $time timestamp
return: bool true if there is new stuff for the RSS Feed

data_rss_delete_file($data)   X-Ref
Given a database object, deletes all cached RSS files associated with it.

param: stdClass $data