version 1.47.8.1, 2010/01/03 21:21:25
|
version 1.51, 2013/05/06 16:15:59
|
Line 60 sub displayfeedname {
|
Line 60 sub displayfeedname {
|
# no, construct a name |
# no, construct a name |
my $name=$filterfilename; |
my $name=$filterfilename; |
if ($name=~/^CourseBlog/) { |
if ($name=~/^CourseBlog/) { |
|
$name=&mt('Course Blog'); |
if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Community') { |
if ($env{'course.'.$env{'request.course.id'}.'.type'} eq 'Community') { |
$name = &mt('Community Blog'); |
$name = &mt('Community Blog'); |
} |
} |
$name=&mt('Course Blog'); |
|
if ($env{'course.'.$env{'request.course.id'}.'.description'}) { |
if ($env{'course.'.$env{'request.course.id'}.'.description'}) { |
$name.=' '.$env{'course.'.$env{'request.course.id'}.'.description'}; |
$name.=' '.$env{'course.'.$env{'request.course.id'}.'.description'}; |
} |
} |
Line 88 sub changefeeddisplay {
|
Line 88 sub changefeeddisplay {
|
} |
} |
|
|
sub advertisefeeds { |
sub advertisefeeds { |
my ($uname,$udom,$edit)=@_; |
my ($uname,$udom,$edit,$count,$hidden)=@_; |
my $feeds=''; |
my $feeds=''; |
my %feednames=&Apache::lonnet::dump('nohist_all_rss_feeds',$udom,$uname); |
my %feednames=&Apache::lonnet::dump('nohist_all_rss_feeds',$udom,$uname); |
my $mode='public'; |
my $mode='public'; |
Line 100 sub advertisefeeds {
|
Line 100 sub advertisefeeds {
|
next if ($feed =~/^\s*$/ || |
next if ($feed =~/^\s*$/ || |
$feed =~ /^error:/ || |
$feed =~ /^error:/ || |
$feed =~ /^feed_display_option_/); |
$feed =~ /^feed_display_option_/); |
|
if ($feednames{'feed_display_option_'.$feed} eq 'hidden') { |
|
if (ref($hidden)) { |
|
$$hidden ++; |
|
} |
|
if (ref($count)) { |
|
unless ($edit) { |
|
next; |
|
} |
|
} |
|
} else { |
|
if (ref($count)) { |
|
$$count ++; |
|
} |
|
} |
my $feedurl= $server.'/public/'.$udom.'/'.$uname.'/'.$feed.'.rss'; |
my $feedurl= $server.'/public/'.$udom.'/'.$uname.'/'.$feed.'.rss'; |
my $htmlurl= $server.'/'.$mode.'/'.$udom.'/'.$uname.'/'.$feed.'_rss.html'; |
my $htmlurl= $server.'/'.$mode.'/'.$udom.'/'.$uname.'/'.$feed.'_rss.html'; |
if ($feednames{'feed_display_option_'.$feed} eq 'hidden') { |
if ($feednames{'feed_display_option_'.$feed} eq 'hidden') { |
Line 261 sub blocking_blogdisplay {
|
Line 274 sub blocking_blogdisplay {
|
if ($blockcause eq 'user') { |
if ($blockcause eq 'user') { |
$output .= &mt('This is because you are a student in one or more courses in which communication is being blocked.'); |
$output .= &mt('This is because you are a student in one or more courses in which communication is being blocked.'); |
if ($html) { |
if ($html) { |
$output .= '<br />'. |
#$output .= '<br />'. |
&Apache::loncommon::build_block_table($startblock, |
#&Apache::loncommon::build_block_table($startblock, |
$endblock,\%setters); |
# $endblock,\%setters); |
|
my ($blocked, $blocktext) = Apache::loncommon::blocking_status('blogs'); |
|
$output .= '<br /><br />'.$blocktext; |
} |
} |
} else { |
} else { |
$output .= &mt('This is because the blog owner is a student in one or more courses in which communication is being blocked.'); |
$output .= &mt('This is because the blog owner is a student in one or more courses in which communication is being blocked.'); |
Line 286 sub handler {
|
Line 301 sub handler {
|
$edit=1; |
$edit=1; |
$html=1; |
$html=1; |
} |
} |
if (($mode eq 'adm') && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'}))) { |
if (($mode eq 'adm') && (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) |
|
&& ($uname eq $env{'course.'.$env{'request.course.id'}.'.num'} && |
|
$udom eq $env{'course.'.$env{'request.course.id'}.'.domain'})) { |
$edit=1; |
$edit=1; |
$html=1; |
$html=1; |
} |
} |