--- loncom/interface/lonmsgdisplay.pm 2008/06/06 17:46:15 1.87 +++ loncom/interface/lonmsgdisplay.pm 2008/08/25 11:20:19 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.87 2008/06/06 17:46:15 bisitz Exp $ +# $Id: lonmsgdisplay.pm,v 1.90 2008/08/25 11:20:19 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -733,23 +733,34 @@ sub groupmail_sent { sub discrit { my $r=shift; - my $header = '

'.&mt('Critical Messages').'

'. - '
'. - ''; + my $header = '

'.&mt('Critical Messages').'

' + .'
' + .&mt('Access to other pages will be prevented until you have moved all critical messages to your inbox.') + .'

' + .'' + .''; my %what=&Apache::lonnet::dump('critical'); my $result = ''; foreach my $key (sort(keys(%what))) { my %content=&Apache::lonmsg::unpackagemsg($what{$key}); next if ($content{'senderdomain'} eq ''); - $result.='
'.&mt('From').': '. -&Apache::loncommon::aboutmewrapper( - &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).' ('. -$content{'sendername'}.':'. - $content{'senderdomain'}.') '.$content{'time'}. - '
'.&mt('Subject').': '.$content{'subject'}. - '
'.
-              &Apache::lontexconvert::msgtexconverted($content{'message'}).
-            '
'; + $result .= &Apache::lonhtmlcommon::start_pick_box() + .&Apache::lonhtmlcommon::row_title(&mt('From'),undef,'LC_oddrow_value') + .''.&Apache::loncommon::aboutmewrapper( + &Apache::loncommon::plainname($content{'sendername'},$content{'senderdomain'}),$content{'sendername'},$content{'senderdomain'}).'' + .' ('.$content{'sendername'}.':'.$content{'senderdomain'}.')' + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::row_title(&mt('Date'),undef,'LC_evenrow_value') + .$content{'time'} + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::row_title(&mt('Subject'),undef,'LC_oddrow_value') + .$content{'subject'} + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::row_title(&mt('Message'),undef,'LC_evenrow_value') + .'
'.&Apache::lontexconvert::msgtexconverted($content{'message'}).'
' + .&Apache::lonhtmlcommon::row_closure() + .&Apache::lonhtmlcommon::row_title('',undef,'LC_oddrow_value') + .'
'; my ($rec_button,$reprec_button); $rec_button = &mt('Move to Inbox'); if (!$content{'noreplies'}) { @@ -764,12 +775,17 @@ $content{'sendername'}.':'. } else { $result .= &mt('Access to other pages will be prevented until you have moved the message to your inbox.'); } - $result .= '

'. - ''; + $result .= '
' + .&Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::row_title('',undef,'LC_evenrow_value') + .''; if (!$content{'noreplies'}) { - $result .= ''; + $result .= '' } + $result .= &Apache::lonhtmlcommon::row_closure(1) + .&Apache::lonhtmlcommon::end_pick_box() + .'
'; } # Check to see if there were any messages. if ($result eq '') { @@ -2139,18 +2155,33 @@ sub displaymessage { $symb=&Apache::lonnet::symbread($content{'baseurl'}); } if ($env{'user.adv'}) { - my $adv_actions; - $r->print(''); + my $actionlist=''; if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { - $r->print(''); - } + $actionlist.=''; + } if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { - $r->print(''); + $actionlist.=''; } if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { - $r->print(''); + $actionlist.=''; } - $r->print('
'.&mt('Currently available actions (will open extra window)').':'.&Apache::loncommon::track_student_link(&mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check').'' + .&Apache::loncommon::track_student_link( + &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check') + .''.&Apache::loncommon::pprmlink(&mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'' + .&Apache::loncommon::pprmlink( + &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check') + .''.&Apache::loncommon::pgrdlink(&mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check').'' + .&Apache::loncommon::pgrdlink( + &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check') + .'
'); + if ($actionlist) { + $r->print('' + .'' + .$actionlist + .'
' + .&mt('Currently available actions (will open extra window):') + .'
'); + } } my ($tolist,$cclist); my (@recipients,@ccs);