--- loncom/interface/lonmsgdisplay.pm 2007/01/04 16:54:07 1.62 +++ loncom/interface/lonmsgdisplay.pm 2007/01/29 20:07:44 1.66 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging display # -# $Id: lonmsgdisplay.pm,v 1.62 2007/01/04 16:54:07 raeburn Exp $ +# $Id: lonmsgdisplay.pm,v 1.66 2007/01/29 20:07:44 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -924,19 +924,11 @@ sub disfolder { nome => 'No messages have been selected to apply ths action to.', chec => 'Check the checkbox for at least one message.', ); + my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(< - function checkall() { - for (i=0; i 0) { + for (var i=0; iprint('

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

'); } + if ($numblocked > 0) { + $r->print(&blocked_in_folder($numblocked,$startblock,$endblock, + \%setters)); + } return; } my $interdis = $env{'form.interdis'}; @@ -1097,8 +1099,8 @@ ENDDISHEADER $r->print(''."\n". '
'. - '
'."\n". - ''."\n". + '
'."\n". + ''."\n". '
 '.&mt('Action').'
'."\n". ' '); if ($numblocked > 0) { - my $beginblock = &Apache::lonlocal::locallocaltime($startblock); - my $finishblock = &Apache::lonlocal::locallocaltime($endblock); - $r->print('

'. - &mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages sent to you by other students between [_2] and [_3] is currently being blocked because of online exams.',$numblocked,$beginblock,$finishblock)); - $r->print(&Apache::loncommon::build_block_table($startblock,$endblock, - \%setters)); + $r->print(&blocked_in_folder($numblocked,$startblock,$endblock, + \%setters)); } } +sub blocked_in_folder { + my ($numblocked,$startblock,$endblock,$setters) = @_; + my $beginblock = &Apache::lonlocal::locallocaltime($startblock); + my $finishblock = &Apache::lonlocal::locallocaltime($endblock); + my $output = '

'. + &mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages sent to you by other students between [_2] and [_3] is currently being blocked because of online exams.',$numblocked,$beginblock,$finishblock); + $output .= &Apache::loncommon::build_block_table($startblock,$endblock, + $setters); + return $output; +} + # ============================================================== Compose output sub compout { @@ -2030,7 +2039,6 @@ sub displaymessage { if (defined($content{'baseurl'})) { $baseurl = &Apache::lonenc::check_encrypt($content{'baseurl'}); } - print STDERR "baseurl is $content{'baseurl'}, title is $content{'resource_title'}, symb is $content{'symb'}, course is $content{'courseid'}\n"; $r->print('
'.&mt('Subject').': '.$content{'subject'}. ($folder ne 'sent'?'
'.&mt('From').': '. &Apache::loncommon::aboutmewrapper( @@ -2272,7 +2280,7 @@ sub sendoffmail { } } if ($env{'form.additionalrec'}) { - foreach my $rec (split(/\,/,$env{'form.additionalrec'})) { + foreach my $rec (split(/\s*,\s*/,$env{'form.additionalrec'})) { my ($auname,$audom)=split(/:/,$rec); if (($auname ne "") && ($audom ne "")) { $toaddr{$auname.':'.$audom}=''; @@ -2719,6 +2727,7 @@ sub handler { my $delresult = &deletefolder($folder); if ($delresult eq 'ok') { $r->print(&mt('Mail folder "[_1]" deleted.',$folder).'
'); + $env{'form.folder'} = ''; } else { $r->print(&mt('Deletion failed.').' '.$delresult.'
'); $showfolder = $folder;