--- loncom/interface/lonmsgdisplay.pm 2010/11/20 13:19:49 1.124.4.12 +++ loncom/interface/lonmsgdisplay.pm 2009/06/05 12:49:50 1.125 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.124.4.12 2010/11/20 13:19:49 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.125 2009/06/05 12:49:50 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -146,7 +146,7 @@ sub folderlist { ); $actions{'select_form_order'} = ['view','rename','delete']; - my %statushash = &Apache::lonlocal::texthash(&get_msgstatus_types()); + my %statushash = &get_msgstatus_types(); $statushash{'select_form_order'} = ['','new','read','replied','forwarded']; @@ -173,7 +173,6 @@ sub folderlist { $formhash{'select_form_order'} = ['','critical',@userorder,'sent','trash']; my $output = qq||; my %show = ('select_form_order' => [10,20,50,100,200], map {$_=>$_} (10,20,50,100,200)); - + + $output .= '
@@ -240,7 +239,7 @@ function folder_choice(targetform,caller
'.$lt{'actn'}.'
'. &Apache::loncommon::select_form('view','folderaction',%actions).'

'. - ' + '
@@ -248,7 +247,7 @@ function folder_choice(targetform,caller '. + '" onClick="javascript:folder_choice(this.form,'."'new'".');" />'. '

'.&mt('Name').'
'. '
@@ -272,13 +271,12 @@ sub get_permanent_folders { } sub get_msgstatus_types { - # Don't translate here! - my %statushash = ( - '' => 'Any', - 'new' => 'Unread', - 'read' => 'Read', - 'replied' => 'Replied to', - 'forwarded' => 'Forwarded', + my %statushash = &Apache::lonlocal::texthash( + '' => 'Any', + new => 'Unread', + read => 'Read', + replied => 'Replied to', + forwarded => 'Forwarded', ); return %statushash; } @@ -291,17 +289,17 @@ sub scrollbuttons { my %statushash = &get_msgstatus_types(); my $status; if ($msgstatus eq '') { - $status = 'All'; # Don't translate here! + $status = &mt('All'); } else { $status = $statushash{$msgstatus}; } return ''.&mt('Page').': '. - ''. - ''. - ' of '.$maxdis. - ''. - '
'. + ''. + ''. + ' of '.$maxdis. + ''. + '
'. &mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).'
'; } # =============================================================== Status Change @@ -509,7 +507,6 @@ sub movemsg { sub discourse { my ($statushash) = @_; my ($result,$active,$previous,$future); - my $crstype = &Apache::loncommon::course_type(); my ($course_personnel, $current_members, $expired_members, @@ -525,20 +522,14 @@ sub discourse { \%defaultUsers, 1,"selectedusers",1,'email') ) { - my $bcc_curr_hdr; - if ($crstype eq 'Community') { - $bcc_curr_hdr = &mt('Bcc: community participants with current access'); - } else { - $bcc_curr_hdr = &mt('Bcc: course members with current access'); - } - $result .= '
' - .''.$bcc_curr_hdr.'' - .'' - .'
'; - $result .= $tmptext.'

'; - if (ref($statushash) eq 'HASH') { - $statushash->{'active'} = 1; - } + $result .= '
' + .&mt('Bcc: course members with current access') + .'' + .'
'; + $result .= $tmptext.'

'; + if (ref($statushash) eq 'HASH') { + $statushash->{'active'} = 1; + } } if ($tmptext = &Apache::lonselstudent::render_student_list($expired_members, "previoususers", @@ -546,20 +537,15 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - my $bcc_prev_hdr; - if ($crstype eq 'Community') { - $bcc_prev_hdr = &mt('Bcc: community participants with expired access'); - } else { - $bcc_prev_hdr = &mt('Bcc: course members with expired access'); - } - $result .= '
' - .''.$bcc_prev_hdr.'' - .'' - .'
'; + $result .= '
' + .&mt('Bcc: course members with expired access') + .'' + .''; $result .= $tmptext.'

'; if (ref($statushash) eq 'HASH') { $statushash->{'previous'} = 1; } + } if ($tmptext = &Apache::lonselstudent::render_student_list($future_members, "futureusers", @@ -567,20 +553,15 @@ sub discourse { \%defaultUsers, 1, "selectedusers",0,'email') ) { - my $bcc_future_hdr; - if ($crstype eq 'Community') { - $bcc_future_hdr = &mt('Bcc: community participants with future access'); - } else { - $bcc_future_hdr = &mt('Bcc: course members with future access'); - } - $result .= '
' - .''.$bcc_future_hdr.'' - .'' - .'
'; + $result .= '
' + .&mt('Bcc: course members with future access') + .'' + .''; $result .= $tmptext.'
'; if (ref($statushash) eq 'HASH') { $statushash->{'future'} = 1; } + } return $result; } @@ -650,8 +631,9 @@ sub disgroup { if (ref($access_status) eq 'HASH') { $access_status->{$status} = $$numitems{$status}; } - $r->print('
'.$lt{$status}. - '
'. + $r->print('
'. + ''.$lt{$status}.''. + ''. ''. ''. @@ -698,7 +680,6 @@ sub disgroup { sub group_check_uncheck { my $output = qq| |; } @@ -746,16 +726,10 @@ sub groupmail_header { } &Apache::lonhtmlcommon::clear_breadcrumbs(); if ($refarg) { - my $brtitle; - if (&Apache::loncommon::course_type() eq 'Community') { - $brtitle = 'View community groups'; - } else { - $brtitle = 'View course groups'; - } &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/coursegroups", text=>"Groups", - title=>$brtitle}); + title=>"View course groups"}); } &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg", @@ -850,11 +824,8 @@ sub discrit { } # Check to see if there were any messages. if ($result eq '') { - $result = - '

'. - &mt('You have no critical messages.'). - '

'. - ''.&mt('Select a course').'
'. + $result = "

".&mt('You have no critical messages.')."

". + ''.&mt('Select a course').'
'. ''.&mt('Communicate').''; } else { $r->print($header); @@ -1020,7 +991,6 @@ sub disfolder { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(< -// + ENDDISHEADER - my $fsqs='&folder='.$folder; + my $fsqs='&folder='.$folder; my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); my $totalnumber=$#temp+1; - if ($totalnumber < 1) { - $r->print('

'); if ($msgstatus eq '') { - $r->print(&mt('There are no messages in this folder.')); + $r->print('

'.&mt('Empty Folder').'

'); } elsif ($msgstatus eq 'replied') { - $r->print(&mt('You have not replied to any messages in this folder.')); + $r->print('

'.&mt('You have not replied to any messages in this folder.').'

'); } else { - $r->print(&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.')); + $r->print('

'.&mt('There are no '.lc($statushash{$msgstatus}).' messages in this folder.').'

'); } - $r->print('

'); if ($numblocked > 0) { $r->print(&blocked_in_folder($numblocked,$startblock,$endblock, \%setters)); } - return; + return; } my $interdis = $env{'form.interdis'}; my $number=int($totalnumber/$interdis); @@ -1088,44 +1055,44 @@ ENDDISHEADER $r->print(''. ''); + $r->print(''.&mt('Date').''); } else { - $r->print(''.&mt('Date').''); + $r->print(''.&mt('Date').''); } $r->print(''); + $r->print(''.&mt('Status').''); } else { - $r->print(''.&mt('Status').''); + $r->print(''.&mt('Status').''); } $r->print("\n"); my $suffix = &Apache::lonmsg::foldersuffix($folder); - my $count = $firstdis; + my $count = 0; for (my $n=$firstdis;$n<=$lastdis;$n++) { my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, $description,$recv_name,$recv_domain)= @@ -1170,7 +1137,7 @@ ENDDISHEADER foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print(''); + $item.(($status eq 'new')?'':'').''); } my $showstatus; my %statushash = &get_msgstatus_types(); @@ -1292,8 +1259,8 @@ sub compout { &printheader($r,'/adm/email?compose=multiforward', 'Forwarding Multiple Messages'); if ($multiforward > 1) { - $r->print(&mt('Each of the[_1] [quant,_2,message] [_3]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.').'
'); @@ -1338,34 +1305,22 @@ sub compout { if (&Apache::lonnet::allowed('srm',$env{'request.course.id'}) || &Apache::lonnet::allowed('srm',$env{'request.course.id'}. '/'.$env{'request.course.sec'})) { - my $crstype = &Apache::loncommon::course_type(); my $crithelp = Apache::loncommon::help_open_topic("Course_Critical_Message"); - my $rsstxt; - if (&Apache::loncommon::course_type() eq 'Community') { - $rsstxt = &mt('Include in community RSS newsfeed'); - } else { - $rsstxt = &mt('Include in course RSS newsfeed'); - } $dispcrit= ''.$crithelp.'  '.&mt('Require return receipt?').'  
'. '
'. '
'; + &mt('Include in course RSS newsfeed').'
'; } if ($broadcast ne 'group') { if (&Apache::lonnet::allowed('dff',$env{'request.course.id'}) || &Apache::lonnet::allowed('dff',$env{'request.course.id'}. '/'.$env{'request.course.sec'})) { - my $rectxt; - if (&Apache::loncommon::course_type() eq 'Community') { - $rectxt = &mt("Include in community's 'User records' for recipient(s)"); - } else { - $rectxt = &mt("Include in course's 'User records' for recipient(s)"); - } + $dispcrit.='
'; } } @@ -1401,7 +1356,6 @@ sub compout { $sendmode = ''."\n"; $broadcast_js = qq| |; @@ -1472,9 +1425,7 @@ function courseRecipients() { my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(<<"ENDREPSCRIPT"); ENDREPSCRIPT } @@ -1743,7 +1694,7 @@ sub additional_rec_row { my $bcc = &mt('Bcc:'); my $exmpl = &mt('username:domain,username:domain,...'); my $output = <<"ENDADD"; -
 '); if ($env{'form.sortedby'} eq "revdate") { - $r->print(''.&mt('Date').''); if ($env{'form.sortedby'} eq "revuser") { - $r->print(''.&mt('Username').''); + $r->print(''.&mt('Username').''); } else { - $r->print(''.&mt('Username').''); + $r->print(''.&mt('Username').''); } $r->print(''); if ($env{'form.sortedby'} eq "revdomain") { - $r->print(''.&mt('Domain').''); + $r->print(''.&mt('Domain').''); } else { - $r->print(''.&mt('Domain').''); + $r->print(''.&mt('Domain').''); } $r->print(''); if ($env{'form.sortedby'} eq "revsubject") { - $r->print(''.&mt('Subject').''); + $r->print(''.&mt('Subject').''); } else { - $r->print(''.&mt('Subject').''); + $r->print(''.&mt('Subject').''); } $r->print(''); if ($env{'form.sortedby'} eq "revcourse") { - $r->print(''.&mt('Course').''); + $r->print(''.&mt('Course').''); } else { - $r->print(''.&mt('Course').''); + $r->print(''.&mt('Course').''); } $r->print(''); if ($env{'form.sortedby'} eq "revstatus") { - $r->print(''.&mt('Status').'
'.(($status eq 'new')?'':''). ''. - $item.(($status eq 'new')?'':'').'
$lt->{'ad'} ($exmpl): + @@ -1838,9 +1789,7 @@ sub disfacetoface { foreach my $key (sort(keys(%records))) { my %content=&Apache::lonmsg::unpackagemsg($records{$key}); next if ($content{'senderdomain'} eq ''); - if (!&Apache::lonfeedback::contains_block_html($content{'message'})) { - &Apache::lonfeedback::newline_to_br(\$content{'message'}); - } + &Apache::lonfeedback::newline_to_br(\$content{'message'}); if ($content{'subject'}=~/^Record/) { $result.='

'.&mt('Record').'

'; } elsif ($content{'subject'}=~/^Broadcast/) { @@ -1928,7 +1877,7 @@ sub facetoface { return; } my $crstype = &Apache::loncommon::course_type(); - my $leaders = ($crstype eq 'Community') ? 'coordinators and leaders' + my $leaders = ($crstype eq 'Group') ? 'coordinators and leaders' : 'faculty and staff'; &printheader($r, '/adm/email?recordftf=query', @@ -1966,7 +1915,6 @@ sub facetoface { .&Apache::lonhtmlcommon::end_pick_box() .'
' .'' - .'' ); if (($stage ne 'query') && @@ -2016,18 +1964,12 @@ sub examblock { $r->print('Not allowed'); return; } - my $usertype; - my $crstype = &Apache::loncommon::course_type(); - if ($crstype eq 'Community') { - $usertype = 'members'; - } else { - $usertype = 'students'; - } - my $lctype = lc($crstype); + my $usertype = (&Apache::loncommon::course_type() eq 'Group') ? 'members' + : 'students'; my %lt=&Apache::lonlocal::texthash( 'comb' => 'Communication Blocking', 'cbds' => 'Communication blocking during scheduled exams', - 'desc' => "You can use communication blocking to prevent $usertype enrolled in this $lctype from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course or community, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.", + 'desc' => "You can use communication blocking to prevent $usertype enrolled in this course from displaying LON-CAPA messages sent by other $usertype during an online exam. As blocking of communication could potentially interrupt legitimate communication between $usertype who are also both enrolled in a different LON-CAPA course, please be careful that you select the correct start and end times for your scheduled exam when setting or modifying these parameters.", 'mecb' => 'Modify existing communication blocking periods', 'ncbc' => 'No communication blocks currently saved', 'stor' => 'Save', @@ -2204,7 +2146,7 @@ sub display_blocker_status { - + END foreach my $record (sort(keys(%{$records}))) { @@ -2224,7 +2166,7 @@ END $setuname,$setudom); $r->print(&Apache::loncommon::start_data_table_row()); $r->print(<<"END"); - + - + - + END $r->print(&Apache::loncommon::start_data_table_row()); @@ -2290,13 +2227,11 @@ END - + + END $r->print(&Apache::loncommon::end_data_table_row()); $r->print(&Apache::loncommon::end_data_table()); @@ -2332,7 +2267,7 @@ sub displaymessage { if ( $blocked{$msgid} eq 'ON' ) { &printheader($r,'/adm/email',&mt('Display a Message')); $r->print(&mt('You attempted to display a message that is currently blocked because you are enrolled in one or more courses for which there is an ongoing online exam.')); - $r->print(&Apache::loncommon::build_block_table($startblock,$endblock,\%setters)); + &build_block_table($r,$startblock,$endblock,\%setters); return; } if ($msgstatus eq '') { @@ -2369,10 +2304,6 @@ sub displaymessage { &printheader($r,'/adm/email?display='.&escape($msgid),'Display a Message','',$content{'baseurl'}); my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'}); -# Functions and Actions - my $li_start='• '; - my $li_end=' '; - # Prepare available functions my @functionlist; if (!$content{'noreplies'}) { @@ -2406,14 +2337,13 @@ sub displaymessage { my $legendtext='' .&mt('Functions') .''; - my $showfunctionlist = $li_start.join($li_end.$li_start,@functionlist).$li_end; $r->print('
' - .'
' - .'' - .$legendtext - .'' - .$showfunctionlist - .'
' + .&Apache::lontemplate::start_functionslist($legendtext) + ); + foreach my $item (@functionlist) { + $r->print(&Apache::lontemplate::item_functionslist($item)); + } + $r->print(&Apache::lontemplate::end_functionslist() .'
' ); @@ -2453,16 +2383,15 @@ sub displaymessage { # Print actions if (@actionlist) { - my $showactionlist = $li_start.join($li_end.$li_start,@actionlist).$li_end; $legendtext=&mt('[_1]Currently available actions[_2] (will open extra window):' ,'',''); $r->print('
' - .'
' - .'' - .$legendtext - .'' - .$showactionlist - .'
' + .&Apache::lontemplate::start_functionslist($legendtext) + ); + foreach my $item (@actionlist) { + $r->print(&Apache::lontemplate::item_functionslist($item)); + } + $r->print(&Apache::lontemplate::end_functionslist() .'
' ); } @@ -2621,14 +2550,12 @@ sub displaymessage { } if ($content{'group'} ne '') { if (&check_group_priv($content{'group'})) { - if (ref($recipients{'group_cc_broadcast'}) eq 'ARRAY') { - $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}}); - if ($groupcclist) { - $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc')) - .$groupcclist - .&Apache::lonhtmlcommon::row_closure() - ); - } + $groupcclist = join(', ',@{$recipients{'group_cc_broadcast'}}); + if ($groupcclist) { + $r->print(&Apache::lonhtmlcommon::row_title(&mt('Group Cc')) + .$groupcclist + .&Apache::lonhtmlcommon::row_closure() + ); } } } @@ -2815,7 +2742,6 @@ sub recipients_link { $body =~ s{\n}{}g; $r->print(< -// + ENDJS @@ -2896,10 +2822,10 @@ sub header { if ($baseurl) { $extra .= ""; } - $r->print(&Apache::loncommon::start_page('Messages', + $r->print(&Apache::loncommon::start_page('Communication', $extra)); $r->print(&Apache::lonhtmlcommon::breadcrumbs - (($title?$title:'Send and display messages'))); + (($title?$title:'Send and Receive Messages'))); } # ---------------------------------------------------------------- Print header @@ -3152,7 +3078,7 @@ sub sendoffmail { my ($recuname,$recdomain)=split(/\:/,$address); my $msgtxt = $savemsg; if ($toaddr{$address}) { - $msgtxt.="\n".'
'."\n".$toaddr{$address}; + $msgtxt.='
'.$toaddr{$address}; } my @thismsg; if ($msgtype eq 'critical') { @@ -3259,9 +3185,8 @@ sub sendoffmail { } if (!$env{'form.multiforward'}) { if ($sendstatus=~/^(\s*(?:ok|con_delayed)\s*)*$/) { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Completed.')); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print('
'.&mt('Completed.'). + ''); if ($env{'form.displayedcrit'}) { &discrit($r); } @@ -3271,15 +3196,10 @@ sub sendoffmail { &Apache::loncommunicate::menu($r); } } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1); - $message .= '
'.&mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print('

'.&Apache::lonhtmlcommon::confirm_success(&mt('Could not deliver message'),1).'
'. + &mt('Please use the browser "Back" button and correct the recipient addresses ([_1]).',$sendstatus).'

'); } } - } else { - &printheader($r,'','Messages cancelled.'); - return 'cancelled'; } return $sendstatus; } @@ -3303,7 +3223,7 @@ sub handler { 'recordftf','sortedby','block','folder','startdis','interdis', 'showcommentbaseurl','dismode','group','subject','text','ref', 'msgstatus']); - $sqs='&sortedby='.$env{'form.sortedby'}; + $sqs='&sortedby='.$env{'form.sortedby'}; # ------------------------------------------------------ They checked for email unless ($env{'form.block'}) { @@ -3315,7 +3235,7 @@ sub handler { &Apache::lonhtmlcommon::clear_breadcrumbs(); &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/communicate", - text=>"Messages", + text=>"Communication/Messages", faq=>12,bug=>'Communication Tools',}); # ------------------------------------------------------------------ Get Folder @@ -3324,7 +3244,7 @@ sub handler { unless ($folder) { $folder=''; } else { - $sqs.='&folder='.&escape($folder); + $sqs.='&folder='.&escape($folder); } # ------------------------------------------------------------ Get Display Mode @@ -3356,7 +3276,7 @@ sub handler { $startdis++; } my $postedstartdis=$startdis+1; - $sqs.='&startdis='.$postedstartdis; + $sqs.='&startdis='.$postedstartdis; # --------------------------------------------------------------- Render Output @@ -3396,10 +3316,9 @@ sub handler { my ($result,$msg) = &statuschange($env{'form.markdel'},'deleted',$folder); if (!$result) { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete the message.'),1); - $message .= '

'.$msg.'

'; - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print('

'. + &mt('Failed to delete the message.').'

'. + '

'.$msg."

\n"); } &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); @@ -3421,9 +3340,7 @@ sub handler { $total ++; } &printheader($r,'','Marked Messages Read'); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] read',$total)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Marked [_1] message(s) read',$total).'

'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markedaction'} eq 'markedunread') { @@ -3434,9 +3351,7 @@ sub handler { $total ++; } &printheader($r,'','Marked Messages Unread'); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Marked [quant,_1,message] unread',$total)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Marked [_1] message(s) unread',$total).'

'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markedaction'} eq 'markedmove') { @@ -3459,16 +3374,15 @@ sub handler { push(@failed_msg,$msg); } } - my $message; - if ($failed) { - $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to move [quant,_1,message]',$failed),1); - $message .= '

'. - join("

\n

",@failed_msg). - "

\n"; - } - $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Moved [quant,_1,message]',$total)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + if ($failed) { + $r->print('

+ '.&mt('Failed to move [_1] message(s)',$failed). + '

'); + $r->print('

'. + join("

\n

",@failed_msg). + "

\n"); + } + $r->print(&mt('Moved [_1] message(s)',$total).'

'); } &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); @@ -3486,16 +3400,15 @@ sub handler { } } &printheader($r,'','Deleted Messages'); - my $message; if ($failed) { - $message = &Apache::lonhtmlcommon::confirm_success(&mt('Failed to delete [quant,_1,message]',$failed),1); - $message .= '

'. + $r->print('

+ '.&mt('Failed to delete [_1] message(s)',$failed). + '

'); + $r->print('

'. join("

\n

",@failed_msg). - "

\n"; + "

\n"); } - $message .= &Apache::lonhtmlcommon::confirm_success(&mt('Deleted [quant,_1,message]',$total)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Deleted [_1] message(s)',$total).'

'); &Apache::loncommunicate::menu($r); &disall($r,($folder?$folder:$dismode),$msgstatus); } elsif ($env{'form.markunread'}) { @@ -3551,19 +3464,19 @@ sub handler { } if (keys(%forwardok) > 0) { my $count = keys(%forwardok); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('[quant,_1,message] forwarded.',$count)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print('
'. + &mt('[quant,_1,message] forwarded.',$count). + ''); } if (keys(%forwardfail) > 0) { my $count = keys(%forwardfail); - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Could not forward [quant,_1,message].',$count),1); + $r->print('

'. + &mt('Could not forward [quant,_1,message].',$count). + ' '); foreach my $key (keys(%forwardfail)) { - $message .= '
'.&mt('Could not deliver forwarded message.').' '. - &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.')'; + $r->print(&mt('Could not deliver forwarded message.').' '. + &mt('The recipient addresses may need to be corrected').' ('.$forwardfail{$key}.').

'); } - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); } &Apache::loncommunicate::menu($r); } else { @@ -3587,13 +3500,10 @@ sub handler { my $showfolder = $env{'form.newfolder'}; my ($makeresult,$warning) = &makefolder($env{'form.newfolder'}); if ($makeresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" created.',$showfolder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" created.',$showfolder).'
'); } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Creation failed.').' '.$makeresult.'
'.$warning,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Creation failed.').' '.$makeresult.'
'. + $warning); $showfolder = $folder; } &Apache::loncommunicate::menu($r); @@ -3605,14 +3515,10 @@ sub handler { my $showfolder = ''; my $delresult = &deletefolder($folder); if ($delresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" deleted.',$folder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" deleted.',$folder).'
'); $env{'form.folder'} = ''; } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Deletion failed.').' '.$delresult,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Deletion failed.').' '.$delresult.'
'); $showfolder = $folder; } &Apache::loncommunicate::menu($r); @@ -3622,13 +3528,9 @@ sub handler { my $showfolder = $env{'form.renamed'}; my $renresult = &renamefolder($folder); if ($renresult eq 'ok') { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder)); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).'
'); } else { - my $message = &Apache::lonhtmlcommon::confirm_success(&mt('Renaming failed.').' '.$renresult,1); - $message = &Apache::loncommon::confirmwrapper($message); - $r->print($message); + $r->print(&mt('Renaming failed.').' '.$renresult.'
'); $showfolder = $folder; } &Apache::loncommunicate::menu($r);

$lt->{'ad'} ($exmpl)
 $lt->{'to'}
 $cc
 $bcc
$ltext->{'setb'} $ltext->{'even'} $ltext->{'blck'}$ltext->{'actn'}$ltext->{'actn'}?
$ltext->{'star'}: $startform
$ltext->{'endd'}:  $endform
$ltext->{'star'}: $startform
$ltext->{'endd'}:  $endform
$settername @@ -2234,16 +2176,11 @@ END if ($blocks->{$block} eq 'on') { $blockstatus = 'checked="checked"'; } - $r->print('
'); + $r->print('
'); } $r->print(<<"END"); -

- +

END $r->print(&Apache::loncommon::end_data_table_row()); $parmcount++; @@ -2280,7 +2217,7 @@ END
$ltext->{'dura'} $ltext->{'even'} $lt{'exam'} $ltext->{'blck'}$ltext->{'actn'}$ltext->{'actn'}?
END foreach my $block (@{$typeorder}) { - $r->print('
'); + $r->print('
'); } $r->print(<<"END"); -