--- loncom/interface/lonnavmaps.pm 2003/03/08 21:16:38 1.155 +++ loncom/interface/lonnavmaps.pm 2003/03/13 17:05:36 1.156 @@ -2,7 +2,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.155 2003/03/08 21:16:38 bowersj2 Exp $ +# $Id: lonnavmaps.pm,v 1.156 2003/03/13 17:05:36 bowersj2 Exp $ # # Copyright Michigan State University Board of Trustees # @@ -620,7 +620,7 @@ sub render_resource { my $icon = ""; if ($resource->is_problem()) { - if ($part eq "0" || $params->{'condensed'}) { + if ($part eq "" || $params->{'condensed'}) { $icon = ''; } else { $icon = $params->{'indentString'}; @@ -692,7 +692,7 @@ sub render_resource { $curMarkerEnd = '<'; } - if ($resource->is_problem() && $part ne "0" && + if ($resource->is_problem() && $part ne "" && !$params->{'condensed'}) { $partLabel = " (Part $part)"; $title = ""; @@ -1107,14 +1107,12 @@ sub render { # If this has been filtered out, continue on if (!(&$filterFunc($curRes))) { - $curRes = $it->next(); $args->{'isNewBranch'} = 0; # Don't falsely remember this next; } # If we're suppressing navmaps and this is a navmap, continue on if ($suppressNavmap && $curRes->src() =~ /^\/adm\/navmaps/) { - $curRes = $it->next(); next; } @@ -1168,28 +1166,19 @@ sub render { } } - - } else { - # Not showing parts - @parts = ("0"); # show main part only } - + # If the multipart problem was condensed, "forget" it was multipart if (scalar(@parts) == 1) { $args->{'multipart'} = 0; } - # In the event of a network error, display one part. - # If this is a single part, we can at least show the correct - # status, but if it's multipart, we're lost, since we can't - # retreive the metadata to count the parts - if ($curRes->{RESOURCE_ERROR}) { - @parts = ("0"); - } - # Now, we've decided what parts to show. Loop through them and # show them. - foreach my $part (@parts) { + foreach my $part ('', @parts) { + if ($part eq '0') { + next; + } $rownum ++; my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)]; @@ -1235,7 +1224,7 @@ sub render { $result = ""; $r->rflush(); } - + } continue { $curRes = $it->next(); } @@ -2756,11 +2745,6 @@ sub extractParts { $self->{PARTS} = \@sortedParts; } - # Ensure part 0 is included at the beginning. - if ($self->{PARTS}->[0] ne '0') { - unshift @{$self->{PARTS}}, '0'; - } - return; }