--- loncom/interface/lonmsg.pm 2004/11/09 16:29:32 1.112
+++ loncom/interface/lonmsg.pm 2004/11/13 14:45:57 1.117
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.112 2004/11/09 16:29:32 www Exp $
+# $Id: lonmsg.pm,v 1.117 2004/11/13 14:45:57 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -523,19 +523,20 @@ sub folderlist {
&mt('Folder').': '.
&Apache::loncommon::select_form($folder,'folder',
('' => &mt('INBOX'),'trash' => &mt('TRASH'),
+ 'new' => &mt('New Messages Only'),
+ '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')).
'
'.
+ ($folder!~/^(new|critical)/?
''.
''.
- ''.
+ ''.
''.
- ''.
- ''.
- &mt('View Critical Messages').''.
+ '':'').
'';
}
@@ -568,6 +569,10 @@ sub statuschange {
sub makefolder {
my ($newfolder)=@_;
+ if (($newfolder eq 'sent')
+ || ($newfolder eq 'critical')
+ || ($newfolder eq 'trash')
+ || ($newfolder eq 'new')) { return; }
&Apache::lonnet::put('email_folders',{$newfolder => time});
}
@@ -858,6 +863,20 @@ ENDLINK
sub disall {
my ($r,$folder)=@_;
+ $r->print(&folderlist($folder));
+ if ($folder eq 'new') {
+ &disnew($r);
+ } elsif ($folder eq 'critical') {
+ &discrit($r);
+ } else {
+ &disfolder($r,$folder);
+ }
+}
+
+# ============================================================ Display a folder
+
+sub disfolder {
+ my ($r,$folder)=@_;
my %blocked = ();
my %setters = ();
my $startblock;
@@ -893,9 +912,7 @@ ENDDISHEADER
if ($firstdis>$#temp) { $firstdis=$#temp-$interdis+1; }
my $lastdis=$firstdis+$interdis-1;
if ($lastdis>$#temp) { $lastdis=$#temp; }
- $r->print('