--- loncom/interface/lonfeedback.pm 2006/12/08 20:09:29 1.232
+++ loncom/interface/lonfeedback.pm 2007/08/06 20:08:31 1.249
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Feedback
#
-# $Id: lonfeedback.pm,v 1.232 2006/12/08 20:09:29 raeburn Exp $
+# $Id: lonfeedback.pm,v 1.249 2007/08/06 20:08:31 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -90,8 +90,8 @@ sub list_discussion {
}
if (not &discussion_visible($status)) {
if ($mode ne 'board') {
- my $encsymb=&Apache::lonenc::check_encrypt($ressymb);
- return &send_message_link($encsymb);
+ &Apache::lonenc::check_encrypt(\$ressymb);
+ return &send_message_link($ressymb);
}
}
if ($group ne '' && $mode eq 'board') {
@@ -100,12 +100,14 @@ sub list_discussion {
}
}
- my ($blocked,$blocktext) = &blocking_posts('boards',1);
+ my ($blocked,$blocktext) =
+ &Apache::loncommon::blocking_status('boards');
if ($blocked) {
+ &Apache::lonenc::check_encrypt(\$ressymb);
if ($mode ne 'board') {
- my $encsymb=&Apache::lonenc::check_encrypt($ressymb);
- return $blocktext.'
'.&send_message_link($encsymb);
+ $blocktext.='
'.&send_message_link($ressymb);
}
+ return $blocktext;
}
my @bgcols = ("#cccccc","#eeeeee");
@@ -635,7 +637,7 @@ END
}
}
if ($dischash{$toggkey}) {
- my $storebutton = &mt('Store read/unread changes');
+ my $storebutton = &mt('Save read/unread changes');
$discussion.='
'.
''."\n".
''.
- &Apache::loncommon::build_block_table($startblock,$endblock,
- \%setters);
- }
- }
- return ($blocked,$output);
-}
-
sub postingform_display {
my ($mode,$ressymb,$now,$subject,$comment,$outputtarget,$attachnum,
$currnewattach,$currdelold,$group) = @_;
@@ -877,7 +860,7 @@ ENDDISCUSS
if ($group ne '') {
$postingform .='';
}
- my ($blockblog) = &blocking_posts('blogs');
+ my $blockblog = &Apache::loncommon::blocking_status('blogs');
if (!$blockblog) {
$postingform .= &add_blog_checkbox();
}
@@ -918,6 +901,9 @@ sub build_posting_display {
$env{'course.'.$env{'request.course.id'}.'.domain'},
$env{'course.'.$env{'request.course.id'}.'.num'});
+ my $see_anonymous =
+ &Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:''));
+
if ((@{$grouppick} == 0) || (grep(/^all$/,@{$grouppick}))) {
$skip_group_check = 1;
}
@@ -1018,7 +1004,7 @@ sub build_posting_display {
@{$$subjectsort{$subject}} = ("$idx");
}
}
- if ((!$contrib{$idx.':anonymous'}) || (&Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')))) {
+ if (!$contrib{$idx.':anonymous'} || $see_anonymous) {
$sender=&Apache::loncommon::aboutmewrapper(
$plainname,
$contrib{$idx.':sendername'},
@@ -1029,7 +1015,9 @@ sub build_posting_display {
$sender.=' ['.$$anonhash{$key}.'] '.
$screenname;
}
-
+ if ($see_anonymous) {
+ $sender.=&Apache::loncommon::student_image_tag($contrib{$idx.':senderdomain'},$contrib{$idx.':sendername'});
+ }
# Set up for sorting by domain, then username
unless (defined($$usernamesort{$contrib{$idx.':senderdomain'}})) {
%{$$usernamesort{$contrib{$idx.':senderdomain'}}} = ();
@@ -1485,7 +1473,7 @@ sub replicate_attachments {
}
sub mail_screen {
- my ($r,$feedurl,$options) = @_;
+ my ($r,$feedurl,$options,$caller_symb) = @_;
if (exists($env{'form.origpage'})) {
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['subject','comment','currnewattach','addnewattach','deloldattach','delnewattach','timestamp','idx','anondiscuss','discuss','blog','group','ref']);
}
@@ -1496,9 +1484,8 @@ sub mail_screen {
'title' => 'Title',
'reta' => 'Retained attachments',
'atta' => 'Attachment (128 KB max size)',
- );
- my $title=&Apache::lonnet::gettitle($feedurl);
- if (!$title) { $title = $feedurl; }
+ );
+ my $restitle = &get_resource_title($caller_symb,$feedurl);
my $quote='';
my $subject = '';
my $comment = '';
@@ -1686,7 +1673,7 @@ END
$r->print(<$title
+$restitle
|