Now RSS links are displayed ok in SITEID course.
Bug 2048. (http://moodle.org/bugs/bug.php?op=show&bugid=2048) Merged from MOODLE_14_STABLE
This commit is contained in:
+2
-2
@@ -45,7 +45,7 @@
|
||||
$generaltable->head = array ($strforum, $strdescription, $strdiscussions);
|
||||
$generaltable->align = array ("left", "left", "center");
|
||||
|
||||
if ($can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin())) {
|
||||
if ($can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin() or $course->id == SITEID)) {
|
||||
$generaltable->head[] = $strsubscribed;
|
||||
$generaltable->align[] = "center";
|
||||
}
|
||||
@@ -182,7 +182,7 @@
|
||||
$learningtable->head = array ($strforum, $strdescription, $strdiscussions);
|
||||
$learningtable->align = array ("left", "left", "center");
|
||||
|
||||
if ($can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin())) {
|
||||
if ($can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin() or $course->id == SITEID)) {
|
||||
$learningtable->head[] = $strsubscribed;
|
||||
$learningtable->align[] = "center";
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
$table->align = array ("LEFT", "CENTER");
|
||||
}
|
||||
|
||||
$can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin());
|
||||
$can_subscribe = (isstudent($course->id) or isteacher($course->id) or isadmin() or $course->id == SITEID);
|
||||
|
||||
if ($show_rss = ($can_subscribe && isset($CFG->enablerssfeeds) && isset($CFG->glossary_enablerssfeeds) &&
|
||||
$CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds)) {
|
||||
|
||||
@@ -230,12 +230,10 @@
|
||||
|
||||
//If rss are activated at site and glossary level and this glossary has rss defined, show link
|
||||
if (isset($CFG->enablerssfeeds) && isset($CFG->glossary_enablerssfeeds) &&
|
||||
$CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds && $glossary->rsstype and $glossary->rssarticles) {
|
||||
$CFG->enablerssfeeds && $CFG->glossary_enablerssfeeds && $glossary->rsstype && $glossary->rssarticles) {
|
||||
echo '<table width="100%" border="0" cellpadding="3" cellspacing="0"><tr valign="top"><td align="right">';
|
||||
$tooltiptext = get_string("rsssubscriberss","glossary",$glossary->name);
|
||||
if (isset($USER->id)) {
|
||||
rss_print_link($course->id, $USER->id, "glossary", $glossary->id, $tooltiptext);
|
||||
}
|
||||
rss_print_link($course->id, $USER->id, "glossary", $glossary->id, $tooltiptext);
|
||||
echo '</td></tr></table>';
|
||||
}
|
||||
|
||||
|
||||
+7
-1
@@ -1,4 +1,4 @@
|
||||
<?PHP // $Id$
|
||||
<?php // $Id$
|
||||
// This file contains all the common stuff to be used in RSS System
|
||||
|
||||
//This function returns the icon (from theme) with the link to rss/file.php
|
||||
@@ -9,6 +9,12 @@ function rss_get_link($courseid, $userid, $modulename, $id, $tooltiptext="") {
|
||||
static $pixpath = '';
|
||||
static $rsspath = '';
|
||||
|
||||
//In site course, if no logged (userid), use admin->id. Bug 2048.
|
||||
if ($courseid == SITEID and empty($userid)) {
|
||||
$admin = get_admin();
|
||||
$userid = $admin->id;
|
||||
}
|
||||
|
||||
if ($CFG->slasharguments) {
|
||||
$rsspath = "$CFG->wwwroot/rss/file.php/$courseid/$userid/$modulename/$id/rss.xml";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user