--- loncom/interface/lonmsgdisplay.pm 2008/11/04 06:22:53 1.95 +++ loncom/interface/lonmsgdisplay.pm 2008/12/14 00:33:35 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.95 2008/11/04 06:22:53 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.103 2008/12/14 00:33:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -243,9 +243,9 @@ function folder_choice(targetform,caller      '. - '

-
'.&mt('New Folder').'
'. + '
'.&mt('Name').'
'. '
@@ -353,7 +353,7 @@ sub makefolder { } } else { $outcome = - &mt('Error - could not obtain lock on email folders record.'); + &mt('Error - could not obtain lock on e-mail folders record.'); } return ($outcome,$warning); } @@ -559,7 +559,8 @@ sub disgroup { my $result; # Needs to be in a course if (!($env{'request.course.fn'})) { - $result = &mt('Error: you must have a course role selected to be able to send a broadcast message to a group in the course.'); + $result = &mt('Error: you must have a course role selected to be able to send a broadcast +e-mail to a group in the course.'); return $result; } if ($cdom eq '' || $cnum eq '') { @@ -717,13 +718,13 @@ sub groupmail_header { {href=>"/adm/email?compose=group&group=". "$env{'form.group'}&$refarg", text=>"Send a Message in a Group", - title=>"Compose Group Email Message"},); + title=>"Compose Group Message"},); if ($action eq 'sending') { &Apache::lonhtmlcommon::add_breadcrumb ({text=>"Messages being sent.", - title=>"Messages sent"},); + title=>"E-mails sent"},); } - my $groupheader = &Apache::loncommon::start_page('Group Email'); + my $groupheader = &Apache::loncommon::start_page('Group Message'); $groupheader .= &Apache::lonhtmlcommon::breadcrumbs ('Group - '.$env{'form.group'}.' Email'); return $groupheader; @@ -737,7 +738,7 @@ sub groupmail_sent { } my $output .= '

'. - &mt('Send another group email').''.'   '. + &mt('Send another group message').''.'   '. ''. &mt('Return to group page').''; return $output; @@ -1107,10 +1108,10 @@ ENDDISHEADER } my $localsenttime = &Apache::lonlocal::locallocaltime($sendtime); my $count = $n +1; - $r->print(''.(($status eq 'new')?'':''). + $r->print(''.(($status eq 'new')?'':''). $count.'.'.(($status eq 'new')?'':'').' '. ''); + ' value="'.$origID.'" />'); foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print(''.(($status eq 'new')?'':''). ''. @@ -1286,7 +1287,7 @@ sub compout { $dispcrit= ''.$crithelp.'  '.&mt('Require return receipt?').'  
'. '
'. +&mt('Send copy to permanent e-mail address (if known)').'
'. '
'; } @@ -1675,6 +1676,7 @@ ENDADD sub submit_button_row { my ($folder,$dismode,$sendtext,$lt,$is_crsform,$group) = @_; my $pre=&mt("Show Preview and Check Spelling"); + my $value=&mt('Send'); my $prevbutton = ''; my $output = qq| @@ -1687,7 +1689,7 @@ sub submit_button_row { } $output .= qq|
- +  $prevbutton
|; @@ -2261,29 +2263,66 @@ sub displaymessage { # start output &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'}); -# Functions - $r->print(''); + +# Functions and Actions + my $li_start='• '; + my $li_end=' '; + +# Prepare available functions + my $functionlist=''; if (!$content{'noreplies'}) { - $r->print(''); - } - $r->print(''. - ''. - ''. - ''); + $functionlist.=$li_start + .'' + .&mt('Reply') + .'' + .$li_end; + } + $functionlist.=$li_start + .'' + .&mt('Forward') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Mark Unread') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Delete') + .'' + .$li_end; + $functionlist.=$li_start + .'' + .&mt('Back to Folder Display') + .'' + .$li_end; if ($counter > 0){ - $r->print(''); + $functionlist.=$li_start + .'' + .&mt('Previous') + .'' + .$li_end; } if ($counter < $number_of_messages - 1){ - $r->print(''); - } - $r->print('
'.&mt('Functions').':'.&mt('Reply').''.&mt('Forward').''.&mt('Mark Unread').''.&mt('Delete').''.&mt('Back to Folder Display').''.&mt('Previous').''.&mt('Next').'
'); + $functionlist.=$li_start + .'' + .&mt('Next') + .'' + .$li_end; + } +# Print functions + $r->print('
' + .'
' + .'' + .&mt('Functions') + .'' + .$functionlist + .'
' + .'
' + ); + +# Prepare available actions my $symb; if (defined($content{'symb'})) { $symb = $content{'symb'}; @@ -2292,33 +2331,40 @@ sub displaymessage { } if ($env{'user.adv'}) { my $actionlist=''; + if (&Apache::lonnet::allowed('vgr',$env{'request.course.id'})) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::track_student_link( &mt('View recent activity'),$content{'sendername'},$content{'senderdomain'},'check') - .''; + .$li_end; } if (&Apache::lonnet::allowed('opa',$env{'request.course.id'}) && $symb) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::pprmlink( &mt('Set/Change parameters'),$content{'sendername'},$content{'senderdomain'},$symb,'check') - .''; + .$li_end; } if (&Apache::lonnet::allowed('mgr',$env{'request.course.id'}) && $symb) { - $actionlist.='' + $actionlist.=$li_start .&Apache::loncommon::pgrdlink( &mt('Set/Change grades'),$content{'sendername'},$content{'senderdomain'},$symb,'check') - .''; + .$li_end; } + +# Print actions if ($actionlist) { - $r->print('' - .'' + .'' .$actionlist - .'
' + $r->print('
' + .'
' + .'' .&mt('Currently available actions (will open extra window):') - .'
'); + .'' + .'' + ); } } + my ($tonum,$tolist,$cclist,$bcclist,$groupcclist,%recipients); if ($content{'recipid'}) { $tonum = &retrieve_recips('display',\%content,\%recipients);