--- loncom/interface/lonmsgdisplay.pm 2010/11/20 13:19:49 1.124.4.12 +++ loncom/interface/lonmsgdisplay.pm 2023/10/07 01:47:21 1.181.2.9.2.3 @@ -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.181.2.9.2.3 2023/10/07 01:47:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -102,6 +102,8 @@ use HTML::TokeParser(); use Apache::Constants qw(:common); use Apache::loncommon(); use Apache::lonhtmlcommon(); +use Apache::longroup; +use Apache::lonnavmaps; use Apache::lontexconvert(); use HTML::Entities(); use Apache::lonlocal; @@ -109,32 +111,35 @@ use Apache::loncommunicate; use Apache::lonfeedback; use Apache::lonrss(); use Apache::lonselstudent(); +use Apache::lonenc(); use lib '/home/httpd/lib/perl/'; -use LONCAPA; +use LONCAPA qw(:DEFAULT :match); # Querystring component with sorting type -my $sqs; -my $startdis; +my $sqs=''; +my $startdis=''; # ============================================================ List all folders sub folderlist { my ($folder,$msgstatus) = @_; - my %lt = &Apache::lonlocal::texthash( + my %html_lt = &Apache::lonlocal::texthash( actn => 'Action', fold => 'Folder', show => 'Show', status => 'Message Status', go => 'Go', + + ); + &html_escape(\%html_lt); + my %js_lt = &Apache::lonlocal::texthash( nnff => 'New Name for Folder', newn => 'New Name', - thfm => 'The folder may not be renamed', - fmnb => 'folder may not be renamed as it is a folder provided by the system.', - asth => 'as this name is already in use for a system-provided or user-defined folder.', - the => 'The', - tnfm => 'The new folder may not be named', + fmnb => 'Folder may not be renamed as it is a folder provided by the system.', + asth => 'Requested name already in use for a system-provided or user-defined folder.', ); + &js_escape(\%js_lt); # set se lastvisit for the new mail check in the toplevel menu &Apache::lonnet::appenv({'user.mailcheck.lastvisit'=>time}); @@ -182,16 +187,16 @@ function folder_choice(targetform,caller if (targetform.folderaction.options[targetform.folderaction.selectedIndex].value == 'rename') { for (var i=0; i + - - - - +
'.$lt{'fold'}.'
'."\n". - &Apache::loncommon::select_form($folder,'folder',%formhash).' +
'.$html_lt{'fold'}.'
'."\n". + &Apache::loncommon::select_form($folder,'folder',\%formhash).'
'.$lt{'show'}.'
'."\n". +
'.$html_lt{'show'}.'
'."\n". &Apache::loncommon::select_form($env{'form.interdis'},'interdis', - %show).' + \%show).'
'.$lt{'status'}.'
'."\n". - &Apache::loncommon::select_form($msgstatus,'msgstatus',%statushash).' +
'.$html_lt{'status'}.'
'."\n". + &Apache::loncommon::select_form($msgstatus,'msgstatus',\%statushash).'
'.$lt{'actn'}.'
'. - &Apache::loncommon::select_form('view','folderaction',%actions).' -

'. - ' +
+ '.$html_lt{'actn'}.'
'."\n".' + '. + &Apache::loncommon::select_form('view','folderaction',\%actions). + ' + +
+ '.&mt('New Folder').'
'."\n".' + + + +
-      - - '. - '

-
'.&mt('Name').'
'. - ' -
- - -'."\n". + +'."\n". ''. ''. ($folder=~/^critical/?'':''); @@ -265,8 +271,8 @@ sub get_permanent_folders { my %permfolders = &Apache::lonlocal::texthash('' => 'INBOX', 'trash' => 'TRASH', - 'critical' => 'Critical', - 'sent' => 'Sent Messages', + 'critical' => 'CRITICAL', + 'sent' => 'SENT MESSAGES', ); return %permfolders; } @@ -295,14 +301,27 @@ sub scrollbuttons { } else { $status = $statushash{$msgstatus}; } - return - ''.&mt('Page').': '. - ''. - ''. - ' of '.$maxdis. - ''. - '
'. - &mt('[_1] messages: showing messages [_2] through [_3] of [_4].',$status,$first,$finish,$total).''; + my $output = ''.&mt('Page:').' '; + if ($maxdis == 1) { + # No buttons if only one page is displayed + $output .= '1/1'; + } else { + $output .= + ''. + ''. + ' / '.$maxdis.' '. + ''. + ''; + } + $output .= + '

' + .''.&mt($status.' messages:').' ' + .&mt('showing messages [_1] through [_2] of [_3].', + $first,$finish,$total) + .'

' + .''; + + return $output; } # =============================================================== Status Change @@ -369,7 +388,7 @@ sub deletefolder { my ($folder)=@_; my %permfolders = &get_permanent_folders(); if (defined($permfolders{$folder})) { - return &mt('The folder "[_1]" may not be deleted',$folder); + return &mt('The folder "[_1]" may not be deleted.',$permfolders{$folder}); } my %userfolders = &Apache::lonmsg::get_user_folders(); if (!defined($userfolders{$folder})) { @@ -525,20 +544,20 @@ 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; - } + 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; + } } if ($tmptext = &Apache::lonselstudent::render_student_list($expired_members, "previoususers", @@ -546,20 +565,21 @@ 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.'' - .'' - .'
'; + 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 .= $tmptext.'

'; if (ref($statushash) eq 'HASH') { $statushash->{'previous'} = 1; } + } if ($tmptext = &Apache::lonselstudent::render_student_list($future_members, "futureusers", @@ -567,20 +587,22 @@ 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.'' - .'' - .'
'; + 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 .= $tmptext.'
'; if (ref($statushash) eq 'HASH') { $statushash->{'future'} = 1; } + } return $result; } @@ -614,9 +636,7 @@ sub disgroup { return; } else { $hasfloat = 1; - unless($env{'environment.wysiwygeditor'} eq 'on') { - $r->print('
'); - } + $r->print('
'); my %Sortby = ( active => {}, previous => {}, @@ -650,8 +670,9 @@ sub disgroup { if (ref($access_status) eq 'HASH') { $access_status->{$status} = $$numitems{$status}; } - $r->print('
'.$lt{$status}. - '
'. + $r->print('
'. + ''.$lt{$status}.''. + ''. ''. ''. @@ -688,9 +709,7 @@ sub disgroup { } } } - unless($env{'environment.wysiwygeditor'} eq 'on') { - $r->print('
'); - } + $r->print('
'); } return $hasfloat; } @@ -751,28 +770,42 @@ sub groupmail_header { $brtitle = 'View community groups'; } else { $brtitle = 'View course groups'; - } + } &Apache::lonhtmlcommon::add_breadcrumb ({href=>"/adm/coursegroups", text=>"Groups", title=>$brtitle}); } + my $view_permission = + &Apache::lonnet::allowed('vcg',$env{'request.course.id'}.($env{'request.course.sec'}?'/'.$env{'request.course.sec'}:'')); + my $navmap=Apache::lonnavmaps::navmap->new(); + my $grouppagelink = &Apache::longroup::get_group_link($cdom,$cnum,$group,$navmap,$view_permission,$refarg); + if ($grouppagelink) { + &Apache::lonhtmlcommon::add_breadcrumb + ({href=>$grouppagelink, + text=>&mt('Group').": $description", + title=>&mt("Go to group's home page"), + no_mt=>1, + },); + } else { + &Apache::lonhtmlcommon::add_breadcrumb + ({text=>&mt('Group').": $description", + no_mt=>1,}); + } &Apache::lonhtmlcommon::add_breadcrumb - ({href=>"/adm/$cdom/$cnum/$group/smppg?$refarg", - text=>"Group: $description", - title=>"Go to group's home page"}, - {href=>"/adm/email?compose=group&group=". - "$env{'form.group'}&$refarg", - text=>"Send a Message in a Group", - title=>"Compose Group Message"},); + ({href=>"/adm/email?compose=group&group=". + "$env{'form.group'}&$refarg", + text=>"Send a Message in a Group", + title=>"Compose Group Message"},); if ($action eq 'sending') { &Apache::lonhtmlcommon::add_breadcrumb ({text=>"Messages being sent.", title=>"E-mails sent"},); } my $groupheader = &Apache::loncommon::start_page('Group Message'); - $groupheader .= &Apache::lonhtmlcommon::breadcrumbs - ('Group - '.$env{'form.group'}.' Email'); + $groupheader .= &Apache::lonhtmlcommon::breadcrumbs( + &mt('Group messages - [_1]',$description), + undef,undef,undef,undef,1); return $groupheader; } @@ -802,9 +835,19 @@ sub discrit { .''; my %what=&Apache::lonnet::dump('critical'); my $result = ''; - foreach my $key (sort(keys(%what))) { + # Sort by date in descending order + foreach my $key (sort{$b <=> $a}(keys(%what))) { my %content=&Apache::lonmsg::unpackagemsg($what{$key}); next if ($content{'senderdomain'} eq ''); + my $description; + if ($content{'courseid'} ne '') { + if ($content{'courseid'} =~ m{/^$match_domain\_$match_courseid$}) { + my %courseinfo=&Apache::lonnet::coursedescription($content{'courseid'},{'one_time' => 1}); + if ($courseinfo{'description'} ne '') { + $description = $courseinfo{'description'}; + } + } + } $result .= &Apache::lonhtmlcommon::start_pick_box() .&Apache::lonhtmlcommon::row_title(&mt('From'),undef,'LC_oddrow_value') .''.&Apache::loncommon::aboutmewrapper( @@ -816,9 +859,14 @@ sub discrit { .&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(1); + if ($description ne '') { + $result .= &Apache::lonhtmlcommon::row_title(&mt('Course'),undef,'LC_oddrow_value') + .$description + .&Apache::lonhtmlcommon::row_closure(1); + } + $result .= &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') .'
'; @@ -854,8 +902,9 @@ sub discrit { '

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

'. - ''.&mt('Select a course').'
'. - ''.&mt('Communicate').''; + &Apache::lonhtmlcommon::actionbox( + [''.&mt('Select a course').'', + ''.&mt('Communicate').'']); } else { $r->print($header); } @@ -864,7 +913,7 @@ sub discrit { } sub sortedmessages { - my ($blocked,$startblock,$endblock,$numblocked,$folder,$msgstatus) = @_; + my ($blocked,$startblock,$endblock,$by_ip,$numblocked,$folder,$msgstatus) = @_; my $suffix=&Apache::lonmsg::foldersuffix($folder); my @messages = &Apache::lonnet::getkeys('nohist_email'.$suffix); #unpack the varibles and repack into temp for sorting @@ -896,7 +945,8 @@ sub sortedmessages { push(@temp1,$content{'recuser'},$content{'recdomain'}); } # Check whether message was sent during blocking period. - if ($sendtime >= $startblock && ($sendtime <= $endblock && $endblock > 0) ) { + if (($by_ip) || + (($sendtime >= $startblock) && ($sendtime <= $endblock && $endblock > 0))) { $$blocked{$msgid} = 'ON'; $$numblocked ++; } else { @@ -972,10 +1022,15 @@ sub get_course_desc { if (defined($env{'course.'.$fromcid.'.description'})) { $description = $env{'course.'.$fromcid.'.description'}; } else { - my %courseinfo=&Apache::lonnet::coursedescription($fromcid); - $description = $courseinfo{'description'}; + if ($fromcid =~ m{/^$match_domain\_$match_courseid$}) { + my %courseinfo=&Apache::lonnet::coursedescription($fromcid, + {'one_time' => 1}); + $description = $courseinfo{'description'}; + } + } + if ($description ne '') { + $$descriptions{$fromcid} = $description; } - $$descriptions{$fromcid} = $description; } return $description; } @@ -992,6 +1047,13 @@ sub disall { &Apache::loncommon::store_settings('user','mail',\%saveable); &Apache::loncommon::restore_settings('user','mail',\%saveable); $folder ||= $env{'form.folder'}; + # Always show critical messages if present + my @what=&Apache::lonnet::dump('critical',$env{'user.domain'},$env{'user.name'}); + if ($what[0]) { + if (($what[0] ne 'con_lost') && ($what[0]!~/^error\:/)) { + $folder = 'critical'; + } + } $msgstatus ||= $env{'form.msgstatus'}; $env{'form.interdis'} ||= 20; @@ -1011,12 +1073,15 @@ sub disfolder { my %blocked = (); my %setters = (); my $numblocked = 0; - my ($startblock,$endblock) = &Apache::loncommon::blockcheck(\%setters,'com'); - my %lt = &Apache::lonlocal::texthash( + my $clientip = &Apache::lonnet::get_requestor_ip($r); + my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) = + &Apache::loncommon::blockcheck(\%setters,'com',$clientip); + my %js_lt = &Apache::lonlocal::texthash( sede => 'Select a destination folder to which the messages will be moved.', - nome => 'No messages have been selected to apply ths action to.', + nome => 'No messages have been selected to apply this action to.', chec => 'Check the checkbox for at least one message.', ); + &js_escape(\%js_lt); my $jscript = &Apache::loncommon::check_uncheck_jscript(); $r->print(< @@ -1027,7 +1092,7 @@ sub disfolder { document.disall.markedaction.value = document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value; if (document.disall.checkedaction.options[document.disall.checkedaction.selectedIndex].value == 'markedmove') { if (document.disall.movetofolder.options[document.disall.movetofolder.selectedIndex].value == "") { - alert("$lt{'sede'}"); + alert("$js_lt{'sede'}"); return; } } @@ -1044,7 +1109,7 @@ sub disfolder { } } if (checktotal == 0) { - alert("$lt{'nome'}\\n$lt{'chec'}"); + alert("$js_lt{'nome'}\\n$js_lt{'chec'}"); return; } document.disall.submit(); @@ -1054,21 +1119,20 @@ sub disfolder { ENDDISHEADER my $fsqs='&folder='.$folder; - my @temp=&sortedmessages(\%blocked,$startblock,$endblock,\$numblocked,$folder,$msgstatus); + my @temp=&sortedmessages(\%blocked,$startblock,$endblock,$by_ip,\$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.')); } elsif ($msgstatus eq 'replied') { $r->print(&mt('You have not replied to any messages in this folder.')); - } else { + } else { $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, + $r->print(&blocked_in_folder($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom, \%setters)); } return; @@ -1086,7 +1150,9 @@ ENDDISHEADER if ($lastdis>$#temp) { $lastdis=$#temp; } $r->print(&scrollbuttons($startdis,$number,$firstdis,$lastdis,$totalnumber,$msgstatus)); $r->print(''. - ''); } else { @@ -1116,7 +1182,7 @@ ENDDISHEADER } else { $r->print(''.&mt('Course').''); } - $r->print(''); } else { @@ -1130,17 +1196,19 @@ ENDDISHEADER my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID, $description,$recv_name,$recv_domain)= @{$temp[$n]}; - if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { + if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) { + my $class_msgstatus = ''; $count ++; - if ($status eq 'new') { - $r->print(''); - } elsif ($status eq 'read') { - $r->print(''); - } elsif ($status eq 'replied') { - $r->print(''); - } else { - $r->print(''); - } + if ($status eq 'new') { + $class_msgstatus = 'LC_mail_new'; + } elsif ($status eq 'read') { + $class_msgstatus = 'LC_mail_read'; + } elsif ($status eq 'replied') { + $class_msgstatus = 'LC_mail_replied'; + } else { + $class_msgstatus = 'LC_mail_other'; + } + $r->print(&Apache::loncommon::start_data_table_row($class_msgstatus)); my ($dis_name,$dis_domain) = ($fromname,$fromdomain); if ($folder eq 'sent') { if (defined($recv_name) && defined($recv_domain)) { @@ -1170,8 +1238,9 @@ ENDDISHEADER foreach my $item ($localsenttime,$dis_name,$dis_domain,$shortsubj) { $r->print(''); + $item.''.(($status eq 'new')?'':'').''); } + # Description and Status my $showstatus; my %statushash = &get_msgstatus_types(); if ($status eq '') { @@ -1179,32 +1248,47 @@ ENDDISHEADER } else { $showstatus = $statushash{$status}; } - $r->print(''."\n"); - } elsif ($status eq 'deleted') { + $r->print(''); + $r->print(''. + ''); + + $r->print(&Apache::loncommon::end_data_table_row()); + + } elsif ($status eq 'deleted') { # purge - my ($result,$msg) = - &movemsg(&unescape($origID),$folder,'trash'); - - } + my ($result,$msg) = + &movemsg(&unescape($origID),$folder,'trash'); + } } - $r->print("
 '); + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_row(). + ' '); if ($env{'form.sortedby'} eq "revdate") { $r->print(''.&mt('Date').''); + $r->print(''); if ($env{'form.sortedby'} eq "revstatus") { $r->print(''.&mt('Status').'
'.(($status eq 'new')?'':''). ''. - $item.(($status eq 'new')?'':'').''.(($status eq 'new')?'':'').$description. - (($status eq 'new')?'':'').''. - (($status eq 'new')?'':'').$showstatus. - (($status eq 'new')?'':'').'
'.(($status eq 'new')?'':'').$description. + (($status eq 'new')?'':''). + '  '. + (($status eq 'new')?'':'').&mt($showstatus). + (($status eq 'new')?'':''). + '
\n"); - $r->print(' + $r->print(&Apache::loncommon::end_data_table()); + + + # Bottom Functions + $r->print(' +
+'.&mt('Message Actions').' +
- '."\n". - ''."\n". + ''."\n"); if (keys(%gotfolders) > 0) { - $r->print(''); } - $r->print(''."\n". - '
'. - '
'."\n". - ''."\n". - '
 '.&mt('Action').'
'."\n". +
'.&mt('Select Messages').'
+ + '."\n". + ' '."\n". + ' + +
'.&mt('Action').'
'."\n". '
'.&mt('Destination folder').'
'); + $r->print('
'.&mt('Destination folder').'
'); my %userfolders; foreach my $key (keys(%gotfolders)) { $userfolders{$key} = $key; } $userfolders{''} = ""; - $r->print(&Apache::loncommon::select_form('','movetofolder',%userfolders). + $r->print(&Apache::loncommon::select_form('','movetofolder',\%userfolders). '
   '. + $r->print(''. '
'); + ''."\n". + '
'."\n" + ); my $postedstartdis=$startdis+1; $r->print(''); if ($numblocked > 0) { $r->print(&blocked_in_folder($numblocked,$startblock,$endblock, - \%setters)); + $by_ip,$clientip,$blockdom,\%setters)); } } sub blocked_in_folder { - my ($numblocked,$startblock,$endblock,$setters) = @_; - my $beginblock = &Apache::lonlocal::locallocaltime($startblock); - my $finishblock = &Apache::lonlocal::locallocaltime($endblock); - my $output = '

'. + my ($numblocked,$startblock,$endblock,$by_ip,$clientip,$blockdom,$setters) = @_; + my $output; + if ($by_ip) { + $output = '

'. + &mt('[quant,_1,message is, messages are] not viewable because display of LON-CAPA messages is blocked for your current IP address: [_2].',$numblocked,$clientip).'
'. + &mt('Note: communication is being blocked for certain IP address(es).'); + } else { + my $beginblock = &Apache::lonlocal::locallocaltime($startblock); + my $finishblock = &Apache::lonlocal::locallocaltime($endblock); + $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); + } + #$output .= &Apache::loncommon::build_block_table($startblock,$endblock, + # $setters); + my ($blocked, $blocktext) = &Apache::loncommon::blocking_status("com",$clientip); + $output .="

".$blocktext; + return $output; } @@ -1256,6 +1352,26 @@ sub blocked_in_folder { sub compout { my ($r,$forwarding,$replying,$broadcast,$replycrit,$folder,$dismode, $multiforward)=@_; + my $clientip = &Apache::lonnet::get_requestor_ip($r); + my %setters; + my ($startblock,$endblock,$triggerblock,$by_ip,$blockdom) = + &Apache::loncommon::blockcheck(\%setters,'com',$clientip); + if ($by_ip) { + my $showdom = &Apache::lonnet::domain($blockdom); + if ($showdom eq '') { + $showdom = $blockdom; + } + $r->print(&Apache::loncommon::start_page('Messages')); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Send and display messages')); + $r->print('

'. + &mt('Sending of LON-CAPA messages is blocked for your current IP address: [_1].',$clientip).'

'. + '
  • '. + &mt('Note: communication is being blocked for certain IP address(es).'). + '
  • '. + &mt('This restriction was set by an administrator in the [_1] LON-CAPA domain.',$showdom). + '
'); + return; + } my $suffix=&Apache::lonmsg::foldersuffix($folder); my ($cdom,$cnum,$group,$refarg); if (exists($env{'form.group'})) { @@ -1293,7 +1409,8 @@ sub compout { '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,'') + .' 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.').'
'); @@ -1329,11 +1446,14 @@ sub compout { 'to' => 'To:', ); my %attachmax = ( - text => &mt('(128 KB max size)'), - num => 131072, + text => &mt('(1 MB max size)'), + num => 1048576, ); if (!$forwarding && !$multiforward) { - $attachrow = ''.$lt{'atta'}.' '.$attachmax{'text'}.': '; + $attachrow = ''.$lt{'atta'}.' '.$attachmax{'text'} + .': ' + .'' + .''; } if (&Apache::lonnet::allowed('srm',$env{'request.course.id'}) || &Apache::lonnet::allowed('srm',$env{'request.course.id'}. @@ -1357,12 +1477,14 @@ sub compout { 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.='