--- loncom/interface/lonmsgdisplay.pm 2007/07/17 18:35:54 1.81 +++ loncom/interface/lonmsgdisplay.pm 2008/02/22 18:08:35 1.85 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.81 2007/07/17 18:35:54 albertel Exp $ +# $Id: lonmsgdisplay.pm,v 1.85 2008/02/22 18:08:35 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -555,7 +555,7 @@ sub disgroup { 'recipients to select.'); return $result; } else { - $result = &mt('Select message recipients from the group members listed below.
'); + $result = &mt('Select message recipients from the group members listed below.').'
'; my %Sortby = ( active => {}, previous => {}, @@ -737,7 +737,7 @@ $content{'sendername'}.':'. '
'.&mt('Subject').': '.$content{'subject'}. '
'.
               &Apache::lontexconvert::msgtexconverted($content{'message'}).
-            '
'; + '
'; my ($rec_button,$reprec_button); $rec_button = &mt('Move to Inbox'); if (!$content{'noreplies'}) { @@ -752,7 +752,7 @@ $content{'sendername'}.':'. } else { $result .= &mt('Access to other pages will be prevented until you have moved the message to your inbox.'); } - $result .= '
'. + $result .= '

'. ''; if (!$content{'noreplies'}) { $result .= ' $jscript - function checkfoldermove() { - if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') { - if (document.disall.movetofolder.options[document.disall.movetofolder.selectedIndex].value == "") { - alert("$lt{'sede'}"); - return; - } - } - return; - } - function validate_checkedaction() { document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value; if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') { @@ -1110,7 +1100,7 @@ ENDDISHEADER ''."\n". ' '."\n". ''.&mt('Action').'
'."\n". - ' '."\n"); if ($folder ne 'trash') { $r->print(' '."\n"); @@ -1204,8 +1194,9 @@ sub compout { &printheader($r,'/adm/email?compose=multiforward', 'Forwarding Multiple Messages'); if ($multiforward > 1) { - $r->print(&mt('Each of the [quant,_1,message] you checked -will be forwarded to the recipient(s) you select below.',$multiforward).'
'); + $r->print(&mt('Each of the [quant,_1,message] you checked' + .' will be forwarded to the recipient(s) you select below.',$multiforward) + .'
'); } else { $r->print(&mt('The message you checked will be forwarded to the recipient(s) you select below.').'
'); } @@ -1514,9 +1505,10 @@ ENDREP sub additional_rec_row { my ($lt) = @_; my $cc = &mt('Cc:'); - my $bcc = &mt('Bcc:'); + my $bcc = &mt('Bcc:'); + my $exmpl = &mt('username:domain,username:domain,...'); my $output = <<"ENDADD"; -$lt->{'ad'} :
username:domain,username:domain, ... +$lt->{'ad'} :
($exmpl)  $cc
$bcc @@ -2073,6 +2065,22 @@ sub displaymessage { $counter++; } $r->print(''); + + my $see_anonymous; + my $from_student = 0; + if ($env{'request.course.id'} eq $content{'courseid'}) { + my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; + my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; + my $username = $content{'sendername'}.':'.$content{'senderdomain'}; + my %classlist_entry = + &Apache::lonnet::get('classlist',[$username],$cdom,$cnum); + if (exists($classlist_entry{$username})) { + $from_student = 1; + $see_anonymous = &Apache::lonnet::allowed('rin',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); + } + } + + my $number_of_messages = scalar(@messages); #subtract 1 for last index # start output &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); @@ -2107,6 +2115,7 @@ sub displaymessage { $symb=&Apache::lonnet::symbread($content{'baseurl'}); } if ($env{'user.adv'}) { + my $adv_actions; $r->print(''); if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { $r->print(''); @@ -2146,7 +2155,10 @@ sub displaymessage { if (defined($content{'baseurl'})) { $baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'}); } - $r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'})); + if ($from_student && $see_anonymous ) { + $r->print(&Apache::loncommon::student_image_tag($content{'senderdomain'},$content{'sendername'})); + } + $r->print('
'.&mt('Subject').': '.$content{'subject'}); if ($folder eq 'sent') { $r->print('
'.&mt('To').': '.$tolist); @@ -2617,7 +2629,7 @@ sub sendoffmail { } } else { $r->print('

'.&mt('Could not deliver message').' '. - &mt('Please use the browser "Back" button and correct the recipient addresses '."($sendstatus)").'

'); + &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'

'); } } }
'.&mt('Currently available actions (will open extra window)').':'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'