[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 21 Sep 2004 19:12:59 -0000
albertel Tue Sep 21 15:12:59 2004 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
- speedup[ navmaps for people with large amount of email
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.294 loncom/interface/lonnavmaps.pm:1.295
--- loncom/interface/lonnavmaps.pm:1.294 Mon Sep 20 11:23:13 2004
+++ loncom/interface/lonnavmaps.pm Tue Sep 21 15:12:59 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.294 2004/09/20 15:23:13 albertel Exp $
+# $Id: lonnavmaps.pm,v 1.295 2004/09/21 19:12:59 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2161,17 +2161,11 @@
foreach my $msgid (split(/\&/, $keys)) {
$msgid=&Apache::lonnet::unescape($msgid);
- my $plain=&Apache::lonnet::unescape(&Apache::lonnet::unescape($msgid));
- if ($plain=~/(Error|Feedback) \[([^\]]+)\]/) {
- my ($what,$url)=($1,$2);
- my %status=
- &Apache::lonnet::get('email_status',[$msgid]);
- if ($status{$msgid}=~/^error\:/) {
- $status{$msgid}='';
- }
-
- if (($status{$msgid} eq 'new') ||
- (!$status{$msgid})) {
+ if ((!$emailstatus{$msgid}) || ($emailstatus{$msgid} eq 'new')) {
+ my $plain=
+ &Apache::lonnet::unescape(&Apache::lonnet::unescape($msgid));
+ if ($plain=~/(Error|Feedback) \[([^\]]+)\]/) {
+ my ($what,$url)=($1,$2);
if ($what eq 'Error') {
$error{$url}.=','.$msgid;
} else {
@@ -2181,8 +2175,10 @@
}
}
+ #url's of resources that have feedbacks
$self->{FEEDBACK} = \%feedback;
- $self->{ERROR_MSG} = \%error; # what is this? JB
+ #or errors
+ $self->{ERROR_MSG} = \%error;
$self->{DISCUSSION_TIME} = \%discussiontime;
$self->{EMAIL_STATUS} = \%emailstatus;
$self->{LAST_READ} = \%lastreadtime;