Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Functions | |
forum_rss_delete_file ($forum) | |
Given a forum object, deletes all cached RSS files associated with it. | |
forum_rss_feed_contents ($forum, $sql, $params, $context) | |
This function return the XML rss contents about the forum It returns false if something is wrong. | |
forum_rss_feed_discussions_sql ($forum, $cm, $newsince=0) | |
Generates the SQL query used to get the Discussion details from the forum table of the database. | |
forum_rss_feed_posts_sql ($forum, $cm, $newsince=0) | |
Generates the SQL query used to get the Post details from the forum table of the database. | |
forum_rss_get_feed ($context, $args) | |
This file adds support to rss feeds generation. | |
forum_rss_get_group_sql ($cm, $groupmode, $currentgroup, $modcontext=null) | |
Retrieve the correct SQL snippet for group-only forums. | |
forum_rss_get_sql ($forum, $cm, $time=0) | |
Determines which type of SQL query is required, one for posts or one for discussions, and returns the appropriate query. | |
forum_rss_newstuff ($forum, $cm, $time) | |
If there is new stuff in the forum since $time this returns true Otherwise it returns false. | |
forum_rss_delete_file | ( | $forum | ) |
Given a forum object, deletes all cached RSS files associated with it.
stdClass | $forum |
forum_rss_feed_contents | ( | $forum, | |
$sql, | |||
$params, | |||
$context ) |
This function return the XML rss contents about the forum It returns false if something is wrong.
stdClass | $forum | the forum object |
string | $sql | the SQL used to retrieve the contents from the database |
array | $params | the SQL parameters used |
object | $context | the context this forum relates to |
bool|string | false if the contents is empty, otherwise the contents of the feed is returned |
@Todo MDL-31129 implement post attachment handling
forum_rss_feed_discussions_sql | ( | $forum, | |
$cm, | |||
$newsince = 0 ) |
Generates the SQL query used to get the Discussion details from the forum table of the database.
stdClass | $forum | the forum object |
stdClass | $cm | Course Module object |
int | $newsince | check for items since this epoch timestamp |
string | the SQL query to be used to get the Discussion details from the forum table of the database |
forum_rss_feed_posts_sql | ( | $forum, | |
$cm, | |||
$newsince = 0 ) |
Generates the SQL query used to get the Post details from the forum table of the database.
stdClass | $forum | the forum object |
stdClass | $cm | Course Module object |
int | $newsince | check for items since this epoch timestamp |
string | the SQL query to be used to get the Post details from the forum table of the database |
forum_rss_get_feed | ( | $context, | |
$args ) |
This file adds support to rss feeds generation.
stdClass | $context | the context |
array | $args | the arguments received in the url |
string | the full path to the cached RSS feed directory. Null if there is a problem. |
forum_rss_get_group_sql | ( | $cm, | |
$groupmode, | |||
$currentgroup, | |||
$modcontext = null ) |
Retrieve the correct SQL snippet for group-only forums.
stdClass | $cm | Course Module object |
int | $groupmode | the mode in which the forum's groups are operating |
bool | $currentgroup | true if the user is from the a group enabled on the forum |
stdClass | $modcontext | The context instance of the forum module |
string | SQL Query for group details of the forum |
forum_rss_get_sql | ( | $forum, | |
$cm, | |||
$time = 0 ) |
Determines which type of SQL query is required, one for posts or one for discussions, and returns the appropriate query.
stdClass | $forum | the forum object |
stdClass | $cm | Course Module object |
int | $time | check for items since this epoch timestamp |
string | the SQL query to be used to get the Discussion/Post details from the forum table of the database |
forum_rss_newstuff | ( | $forum, | |
$cm, | |||
$time ) |
If there is new stuff in the forum since $time this returns true Otherwise it returns false.
stdClass | $forum | the forum object |
stdClass | $cm | Course Module object |
int | $time | check for items since this epoch timestamp |
bool | True for new items |