rss MDL-23391 alter the rss urls to be component names ie mod_forum instead of just module name ie forum

This commit is contained in:
Andrew Davis 2010-07-19 10:57:52 +00:00
parent 44c0751bbf
commit aa60291e12
11 changed files with 48 additions and 62 deletions

View file

@ -106,7 +106,7 @@ if ($cancel) {
/// RSS and CSS and JS meta
if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
$rsspath = rss_get_url($context->id, $USER->id, 'data', $data->id);
$rsspath = rss_get_url($context->id, $USER->id, 'mod_data', $data->id);
$PAGE->add_alternate_version(format_string($course->shortname) . ': %fullname%',
$rsspath, 'application/rss+xml');
}

View file

@ -114,7 +114,7 @@ foreach ($datas as $data) {
$rsslink = '';
if ($rss && $data->rssarticles > 0) {
$rsslink = rss_get_link($context->id, $USER->id, 'data', $data->id, 'RSS');
$rsslink = rss_get_link($context->id, $USER->id, 'mod_data', $data->id, 'RSS');
}
if ($usesections) {

View file

@ -2874,7 +2874,7 @@ function data_extend_settings_navigation(settings_navigation $settings, navigati
$string = get_string('rsstype','forum');
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $USER->id, 'data', $data->id));
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $USER->id, 'mod_data', $data->id));
$datanode->add($string, $url, settings_navigation::TYPE_SETTING, null, null, new pix_icon('i/rss', ''));
}
}

View file

@ -317,7 +317,7 @@
//this links has been Settings (database activity administration) block
/*if (!empty($CFG->enablerssfeeds) && !empty($CFG->data_enablerssfeeds) && $data->rssarticles > 0) {
echo '<div style="float:right;">';
rss_print_link($context->id, $USER->id, 'data', $data->id, get_string('rsstype'));
rss_print_link($context->id, $USER->id, 'mod_data', $data->id, get_string('rsstype'));
echo '</div>';
echo '<div style="clear:both;"></div>';
}*/

View file

@ -258,7 +258,7 @@ if ($generalforums) {
$tooltiptext = get_string('rsssubscriberssposts', 'forum');
}
//Get html code for RSS link
$row[] = rss_get_link($context->id, $USER->id, 'forum', $forum->id, $tooltiptext);
$row[] = rss_get_link($context->id, $USER->id, 'mod_forum', $forum->id, $tooltiptext);
} else {
$row[] = '&nbsp;';
}
@ -388,7 +388,7 @@ if ($course->id != SITEID) { // Only real courses have learning forums
$tooltiptext = get_string('rsssubscriberssposts', 'forum');
}
//Get html code for RSS link
$row[] = rss_get_link($context->id, $USER->id, 'forum', $forum->id, $tooltiptext);
$row[] = rss_get_link($context->id, $USER->id, 'mod_forum', $forum->id, $tooltiptext);
} else {
$row[] = '&nbsp;';
}

View file

@ -7520,7 +7520,7 @@ function forum_extend_settings_navigation(settings_navigation $settingsnav, navi
} else {
$userid = $USER->id;
}
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $userid, "forum", $forumobject->id));
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $userid, "mod_forum", $forumobject->id));
$forumnode->add($string, $url, settings_navigation::TYPE_SETTING, null, null, new pix_icon('i/rss', ''));
}
}

View file

@ -113,7 +113,7 @@ foreach ($glossarys as $glossary) {
$userid = $USER->id;
}
//Get html code for RSS link
$rsslink = rss_get_link($context->id, $userid, "glossary", $glossary->id, $tooltiptext);
$rsslink = rss_get_link($context->id, $userid, 'mod_glossary', $glossary->id, $tooltiptext);
}
}

View file

@ -2603,7 +2603,7 @@ function glossary_extend_settings_navigation(settings_navigation $settings, navi
$string = get_string('rsstype','forum');
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $USER->id, 'glossary', $glossary->id));
$url = new moodle_url(rss_get_url($PAGE->cm->context->id, $USER->id, 'mod_glossary', $glossary->id));
$glossarynode->add($string, $url, settings_navigation::TYPE_SETTING, null, null, new pix_icon('i/rss', ''));
}
}