--- loncom/interface/lonrss.pm 2008/11/11 10:45:22 1.38
+++ loncom/interface/lonrss.pm 2008/12/08 23:16:46 1.39
@@ -1,7 +1,7 @@
# The LearningOnline Network
# RSS Feeder
#
-# $Id: lonrss.pm,v 1.38 2008/11/11 10:45:22 amueller Exp $
+# $Id: lonrss.pm,v 1.39 2008/12/08 23:16:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -303,9 +303,21 @@ sub handler {
my $filterfeedname=&filterfeedname($filename);
my $feedname=&feedname($filename);
my ($displayfeedname,$displayoption)=&displayfeedname($filename,$uname,$udom);
- my ($blocked,$blocktext);
+ my ($blocked,$blocktext,$disabled,$disabletext);
if (!&Apache::lonnet::is_course($udom,$uname)) {
($blocked,$blocktext) = &blocking_blogdisplay($uname,$udom,$html,$filterfeedname);
+ $disabled = &Apache::lonnet::usertools_access($uname,$udom,'blog');
+ if ($disabled) {
+ if ($html) {
+ $disabletext = '
'.&mt('No user blog available') .'
'.
+ &mt('This is a result of one of the following:').''.
+ '- '.&mt('The administrator of this domain has disabled blog functionality for this specific user.').'
'.
+ '- '.&mt('The domain has been configured to disable, by default, blog functionality for all users in the domain.').'
'.
+ '
';
+ } else {
+ $disabletext = &mt('No user blog available');
+ }
+ }
}
if ($html) {
my $title = $displayfeedname?$displayfeedname
@@ -329,7 +341,7 @@ sub handler {
my $newid = &get_new_feed_id();
# Is this user for real?
my $homeserver=&Apache::lonnet::homeserver($uname,$udom);
- if ($html && !$blocked) {
+ if ($html && !$blocked && !&disabled) {
# Any new feeds or renaming of feeds?
if ($edit) {
# Hide a feed?
@@ -361,6 +373,9 @@ sub handler {
} elsif ($blocked) {
$r->print($blocktext);
$r->print(($html?&Apache::loncommon::end_page():''."\n"));
+ } elsif ($disabled) {
+ $r->print($disabletext);
+ $r->print(($html?&Apache::loncommon::end_page():''."\n"));
} else { # is indeed a user
# Course or user?
my $name='';