--- loncom/interface/lonnavmaps.pm 2004/09/16 16:56:37 1.291 +++ loncom/interface/lonnavmaps.pm 2004/09/21 19:12:59 1.295 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.291 2004/09/16 16:56:37 albertel Exp $ +# $Id: lonnavmaps.pm,v 1.295 2004/09/21 19:12:59 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -127,7 +127,7 @@ sub nav_control_js { function gonav(url) { if (w_loncapanav_flag != 1) { - go(url); + gopost(url,''); } else { navwindow=window.open(url, "loncapanav","height=600,width=400,scrollbars=1"); @@ -1428,7 +1428,7 @@ sub render { # We only need to do this if we need to open the maps to show the # current position. This will change the counter so we can't count # for the jump marker with this loop. - while (($curRes = $mapIterator->next()) && !$found) { + while ($here && ($curRes = $mapIterator->next()) && !$found) { if (ref($curRes) && $curRes->symb() eq $here) { my $mapStack = $mapIterator->getStack(); @@ -2161,17 +2161,11 @@ sub generate_email_discuss_status { 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 @@ sub generate_email_discuss_status { } } + #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; @@ -3964,8 +3960,8 @@ sub countParts { sub countResponses { my $self = shift; my $count; - foreach my $part ($self->parts()) { - $count+= $self->responseIds($part); + foreach my $part (@{$self->parts()}) { + $count+= scalar($self->responseIds($part)); } return $count; }