'
.&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 = '';
@@ -830,6 +855,7 @@ sub sortedmessages {
}
foreach my $msgid (@messages) {
+ next if ($msgid eq '');
my $esc_msgid=&escape($msgid);
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$fromcid,$processid,$symb,$error) =
&Apache::lonmsg::unpackmsgid($esc_msgid,$folder,undef,
@@ -969,6 +995,7 @@ 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) {
@@ -1070,11 +1097,13 @@ ENDDISHEADER
$r->print("\n");
my $suffix = &Apache::lonmsg::foldersuffix($folder);
+ my $count = 0;
for (my $n=$firstdis;$n<=$lastdis;$n++) {
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID,
$description,$recv_name,$recv_domain)=
@{$temp[$n]};
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
+ $count ++;
if ($status eq 'new') {
$r->print('
');
+ }
}
$r->print(&generate_preview_form);
}
@@ -1664,10 +1703,10 @@ sub additional_rec_row {
my $bcc = &mt('Bcc:');
my $exmpl = &mt('username:domain,username:domain,...');
my $output = <<"ENDADD";
-
ENDADD
return $output;
}
@@ -1813,7 +1852,7 @@ $content{'sendername'}.':'.
}
# Check to see if there were any messages.
if ($result eq '') {
- my $lctype = lc(&Apache::loncommon::course_type());
+ my $lctype = &mt(lc(&Apache::loncommon::course_type()));
if ($target ne 'tex') {
$r->print("
".&mt('No notes, face-to-face discussion records, critical messages, or broadcast messages in this [_1].',$lctype)."
");
} else {
@@ -1870,21 +1909,23 @@ sub facetoface {
'subm' => 'Retrieve discussion and message records',
'newr' => 'New Record (record is visible to '.lc($crstype).' '.$leaders.')',
'post' => 'Post this Record');
- $r->print(<<"ENDTREC");
-
'.
+ &Apache::loncommon::start_data_table();
my $cell = 0;
$body .= &Apache::loncommon::start_data_table_row();
foreach my $item (@{$recipients->{$show.'_broadcast'}}) {
@@ -2706,6 +2747,7 @@ sub recipients_link {
$body =~ s{\n}{}g;
$r->print(<
+//
ENDJS
@@ -2782,15 +2824,14 @@ sub displayresource {
sub header {
my ($r,$title,$baseurl)=@_;
-
my $extra = &Apache::loncommon::studentbrowser_javascript();
if ($baseurl) {
$extra .= "";
}
- $r->print(&Apache::loncommon::start_page('Communication and Messages',
+ $r->print(&Apache::loncommon::start_page('Communication',
$extra));
$r->print(&Apache::lonhtmlcommon::breadcrumbs
- (($title?$title:'Communication and Messages')));
+ (($title?$title:'Send and Receive Messages')));
}
# ---------------------------------------------------------------- Print header
@@ -3161,7 +3202,7 @@ sub sendoffmail {
&Apache::loncommunicate::menu($r);
}
} else {
- $r->print('
'.&mt('Could not deliver 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).'
');
}
}
@@ -3188,7 +3229,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'}) {
@@ -3209,7 +3250,7 @@ sub handler {
unless ($folder) {
$folder='';
} else {
- $sqs.='&folder='.&escape($folder);
+ $sqs.='&folder='.&escape($folder);
}
# ------------------------------------------------------------ Get Display Mode
@@ -3241,7 +3282,7 @@ sub handler {
$startdis++;
}
my $postedstartdis=$startdis+1;
- $sqs.='&startdis='.$postedstartdis;
+ $sqs.='&startdis='.$postedstartdis;
# --------------------------------------------------------------- Render Output
@@ -3465,7 +3506,7 @@ sub handler {
my $showfolder = $env{'form.newfolder'};
my ($makeresult,$warning) = &makefolder($env{'form.newfolder'});
if ($makeresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" created.',$showfolder).' ');
+ $r->print(&mt('Folder "[_1]" created.',$showfolder).' ');
} else {
$r->print(&mt('Creation failed.').' '.$makeresult.' '.
$warning);
@@ -3480,7 +3521,7 @@ sub handler {
my $showfolder = '';
my $delresult = &deletefolder($folder);
if ($delresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" deleted.',$folder).' ');
+ $r->print(&mt('Folder "[_1]" deleted.',$folder).' ');
$env{'form.folder'} = '';
} else {
$r->print(&mt('Deletion failed.').' '.$delresult.' ');
@@ -3493,7 +3534,7 @@ sub handler {
my $showfolder = $env{'form.renamed'};
my $renresult = &renamefolder($folder);
if ($renresult eq 'ok') {
- $r->print(&mt('Mail folder "[_1]" renamed "[_2]".',$folder,$showfolder).' ');
+ $r->print(&mt('Folder "[_1]" renamed to "[_2]".',$folder,$showfolder).' ');
} else {
$r->print(&mt('Renaming failed.').' '.$renresult.' ');
$showfolder = $folder;