Bug 2048.
(http://moodle.org/bugs/bug.php?op=show&bugid=2048)
Merged from MOODLE_14_STABLE
$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";
}
$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";
}
$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)) {
//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>';
}
-<?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
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 {