[LON-CAPA-cvs] cvs: loncom /interface lonmsg.pm /xml lonxml.pm
www
lon-capa-cvs@mail.lon-capa.org
Fri, 11 Oct 2002 20:09:36 -0000
www Fri Oct 11 16:09:36 2002 EDT
Modified files:
/loncom/interface lonmsg.pm
/loncom/xml lonxml.pm
Log:
Actually check for mail
Index: loncom/interface/lonmsg.pm
diff -u loncom/interface/lonmsg.pm:1.40 loncom/interface/lonmsg.pm:1.41
--- loncom/interface/lonmsg.pm:1.40 Fri Oct 11 16:04:34 2002
+++ loncom/interface/lonmsg.pm Fri Oct 11 16:09:36 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging
#
-# $Id: lonmsg.pm,v 1.40 2002/10/11 20:04:34 www Exp $
+# $Id: lonmsg.pm,v 1.41 2002/10/11 20:09:36 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -125,7 +125,6 @@
if ((time-$ENV{'user.mailcheck.time'})>300) {
my %what=&Apache::lonnet::get('email_status',['recnewemail']);
&Apache::lonnet::appenv('user.mailcheck.time'=>time);
- &Apache::lonnet::logthis('Check Mail: '.$what{'recnewemail'});
if ($what{'recnewemail'}>0) { return 1; }
}
return 0;
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.199 loncom/xml/lonxml.pm:1.200
--- loncom/xml/lonxml.pm:1.199 Tue Oct 8 13:09:09 2002
+++ loncom/xml/lonxml.pm Fri Oct 11 16:09:36 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.199 2002/10/08 17:09:09 albertel Exp $
+# $Id: lonxml.pm,v 1.200 2002/10/11 20:09:36 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -100,6 +100,7 @@
use Apache::File();
use Apache::loncommon();
use Apache::lonfeedback();
+use Apache::lonmsg();
#================================================== Main subroutine: xmlparse
#debugging control, to turn on debugging modify the correct handler
@@ -382,6 +383,10 @@
$Apache::lonxml::registered=1;
my $nothing='';
if ($ENV{'browser.type'} eq 'explorer') { $nothing='javascript:void(0);'; }
+ my $newmail='';
+ if (&Apache::lonmsg::newmail()) {
+ $newmail='menu.setstatus("you have","got mail");';
+ }
my $timesync='menu.syncclock(1000*'.time.');';
if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) {
my $hwkadd='';
@@ -411,6 +416,7 @@
menu=window.open("$nothing","LONCAPAmenu","",false);
menu.clearTimeout(menu.menucltim);
$timesync
+ $newmail
menu.currentURL=window.location.pathname;
menu.reloadURL=window.location.pathname;
menu.currentStale=0;