mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-81577' of https://github.com/paulholden/moodle
This commit is contained in:
commit
803e94cf8a
@ -314,8 +314,6 @@ function forum_rss_get_group_sql($cm, $groupmode, $currentgroup, $modcontext=nul
|
||||
function forum_rss_feed_contents($forum, $sql, $params, $context) {
|
||||
global $CFG, $DB, $USER;
|
||||
|
||||
$status = true;
|
||||
|
||||
$recs = $DB->get_recordset_sql($sql, $params, 0, $forum->rssarticles);
|
||||
|
||||
//set a flag. Are we displaying discussions or posts?
|
||||
@ -328,7 +326,6 @@ function forum_rss_feed_contents($forum, $sql, $params, $context) {
|
||||
throw new \moodle_exception('invalidcoursemodule');
|
||||
}
|
||||
|
||||
$formatoptions = new stdClass();
|
||||
$items = array();
|
||||
foreach ($recs as $rec) {
|
||||
$item = new stdClass();
|
||||
@ -377,7 +374,6 @@ function forum_rss_feed_contents($forum, $sql, $params, $context) {
|
||||
$item->author = fullname($rec);
|
||||
$message = file_rewrite_pluginfile_urls($rec->postmessage, 'pluginfile.php', $context->id,
|
||||
'mod_forum', 'post', $rec->postid);
|
||||
$formatoptions->trusted = $rec->posttrust;
|
||||
}
|
||||
|
||||
if ($isdiscussion) {
|
||||
@ -386,8 +382,10 @@ function forum_rss_feed_contents($forum, $sql, $params, $context) {
|
||||
$item->link = $CFG->wwwroot."/mod/forum/discuss.php?d=".$rec->discussionid."&parent=".$rec->postid;
|
||||
}
|
||||
|
||||
$formatoptions->trusted = $rec->posttrust;
|
||||
$item->description = format_text($message, $rec->postformat, $formatoptions, $forum->course);
|
||||
$item->description = format_text($message, $rec->postformat, [
|
||||
'context' => $context,
|
||||
'trusted' => $rec->posttrust,
|
||||
]);
|
||||
|
||||
//TODO: MDL-31129 implement post attachment handling
|
||||
/*if (!$isdiscussion) {
|
||||
|
@ -81,9 +81,6 @@
|
||||
|
||||
$items = array();
|
||||
|
||||
$formatoptions = new stdClass();
|
||||
$formatoptions->trusttext = true;
|
||||
|
||||
foreach ($recs as $rec) {
|
||||
$item = new stdClass();
|
||||
$item->title = $rec->entryconcept;
|
||||
@ -97,7 +94,10 @@
|
||||
|
||||
$definition = file_rewrite_pluginfile_urls($rec->entrydefinition, 'pluginfile.php',
|
||||
$modcontext->id, 'mod_glossary', 'entry', $rec->entryid);
|
||||
$item->description = format_text($definition, $rec->entryformat, $formatoptions, $glossary->course);
|
||||
$item->description = format_text($definition, $rec->entryformat, [
|
||||
'context' => $modcontext,
|
||||
'trusted' => true,
|
||||
]);
|
||||
$items[] = $item;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user