--- loncom/interface/lonmsg.pm 2004/12/15 01:17:09 1.124
+++ loncom/interface/lonmsg.pm 2005/01/01 17:58:48 1.126
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.124 2004/12/15 01:17:09 www Exp $
+# $Id: lonmsg.pm,v 1.126 2005/01/01 17:58:48 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -527,9 +527,11 @@ sub folderlist {
'critical' => &mt('Critical'),
'sent' => &mt('Sent Messages'),
map { $_ => $_ } @allfolders)).
- ' '.&mt('Show').' '.
- &Apache::loncommon::select_form($interdis,'interdis',
-(' 10' => '10', ' 20' => '20', ' 50' => '50', '100' => '100', '200' => '200')).
+ ' '.&mt('Show').
+ ''.
'
'.
''.
($folder=~/^(new|critical)/?'':'');
@@ -918,6 +920,9 @@ ENDDISHEADER
$r->print('
'.&mt('Empty Folder').'
');
return;
}
+ unless ($interdis) {
+ $interdis=20;
+ }
my $number=int($totalnumber/$interdis);
if (($startdis<0) || ($startdis>$number)) { $startdis=$number; }
my $firstdis=$interdis*$startdis;
@@ -956,7 +961,7 @@ ENDDISHEADER
} else {
$r->print(''.&mt('Status').'');
}
- $r->print('');
+ $r->print("\n");
for (my $n=$firstdis;$n<=$lastdis;$n++) {
my ($sendtime,$shortsubj,$fromname,$fromdomain,$status,$origID)= @{$temp[$n]};
if (($status ne 'deleted') && defined($sendtime) && $sendtime!~/error/) {
@@ -976,13 +981,13 @@ ENDDISHEADER
''.&Apache::lonlocal::locallocaltime($sendtime).' | '.
$fromname.' | '.$fromdomain.' | '.
&Apache::lonnet::unescape($shortsubj).' | '.
- $status.' | ');
+ $status."\n");
} elsif ($status eq 'deleted') {
# purge
&movemsg(&Apache::lonnet::unescape($origID),$folder,'trash');
}
}
- $r->print(''.
+ $r->print("\n
".
''.&mt('Check All').' '.
''.&mt('Uncheck All').'
'.
'');
@@ -997,7 +1002,8 @@ ENDDISHEADER
&Apache::loncommon::select_form('','movetofolder',
( map { $_ => $_ } @allfolders))
);
- $r->print('');
+ my $postedstartdis=$startdis+1;
+ $r->print('');
if ($numblocked > 0) {
my $beginblock = &Apache::lonlocal::locallocaltime($startblock);
my $finishblock = &Apache::lonlocal::locallocaltime($endblock);
@@ -1736,9 +1742,8 @@ sub displaymessage {
'">'.&mt('Mark Unread').''.
'Delete | '.
- ''.&mt('Display all Messages').' | ');
+ ''.&mt('Back to Folder Display').' | ');
if ($counter > 0){
$r->print(''.&mt('Previous').' | ');
@@ -1986,9 +1991,7 @@ sub handler {
'sendreply','compose','sendmail','critical','recname','recdom',
'recordftf','sortedby','block','folder','startdis','interdis',
'showcommentbaseurl']);
- $sqs='&sortedby='.$ENV{'form.sortedby'}.
- '&startdis='.$ENV{'form.startdis'}.
- '&interdis='.$ENV{'form.interdis'};
+ $sqs='&sortedby='.$ENV{'form.sortedby'};
# ------------------------------------------------------ They checked for email
unless ($ENV{'form.block'}) {
@@ -2009,7 +2012,7 @@ sub handler {
unless ($folder) {
$folder='';
} else {
- $sqs='&folder='.&Apache::lonnet::escape($folder);
+ $sqs.='&folder='.&Apache::lonnet::escape($folder);
}
# --------------------------------------------------------------------- Display
@@ -2017,8 +2020,11 @@ sub handler {
$startdis=$ENV{'form.startdis'};
$startdis--;
unless ($startdis) { $startdis=0; }
+
$interdis=$ENV{'form.interdis'};
unless ($interdis) { $interdis=20; }
+ $sqs.='&interdis='.$interdis;
+
if ($ENV{'form.firstview'}) {
$startdis=0;
}
@@ -2031,7 +2037,8 @@ sub handler {
if ($ENV{'form.nextview'}) {
$startdis++;
}
-
+ my $postedstartdis=$startdis+1;
+ $sqs.='&startdis='.$postedstartdis;
# --------------------------------------------------------------- Render Output