version 1.155, 2003/03/08 21:16:38
|
version 1.157, 2003/03/13 17:10:25
|
Line 620 sub render_resource {
|
Line 620 sub render_resource {
|
my $icon = "<img src='/adm/lonIcons/html.gif' alt='' border='0' />"; |
my $icon = "<img src='/adm/lonIcons/html.gif' alt='' border='0' />"; |
|
|
if ($resource->is_problem()) { |
if ($resource->is_problem()) { |
if ($part eq "0" || $params->{'condensed'}) { |
if ($part eq "" || $params->{'condensed'}) { |
$icon = '<img src="/adm/lonIcons/problem.gif" alt="" border="0" />'; |
$icon = '<img src="/adm/lonIcons/problem.gif" alt="" border="0" />'; |
} else { |
} else { |
$icon = $params->{'indentString'}; |
$icon = $params->{'indentString'}; |
Line 692 sub render_resource {
|
Line 692 sub render_resource {
|
$curMarkerEnd = '<font color="red" size="+2"><</font>'; |
$curMarkerEnd = '<font color="red" size="+2"><</font>'; |
} |
} |
|
|
if ($resource->is_problem() && $part ne "0" && |
if ($resource->is_problem() && $part ne "" && |
!$params->{'condensed'}) { |
!$params->{'condensed'}) { |
$partLabel = " (Part $part)"; |
$partLabel = " (Part $part)"; |
$title = ""; |
$title = ""; |
Line 1099 sub render {
|
Line 1099 sub render {
|
|
|
# If this isn't an actual resource, continue on |
# If this isn't an actual resource, continue on |
if (!ref($curRes)) { |
if (!ref($curRes)) { |
$curRes = $it->next(); |
|
next; |
next; |
} |
} |
|
|
Line 1107 sub render {
|
Line 1106 sub render {
|
|
|
# If this has been filtered out, continue on |
# If this has been filtered out, continue on |
if (!(&$filterFunc($curRes))) { |
if (!(&$filterFunc($curRes))) { |
$curRes = $it->next(); |
|
$args->{'isNewBranch'} = 0; # Don't falsely remember this |
$args->{'isNewBranch'} = 0; # Don't falsely remember this |
next; |
next; |
} |
} |
|
|
# If we're suppressing navmaps and this is a navmap, continue on |
# If we're suppressing navmaps and this is a navmap, continue on |
if ($suppressNavmap && $curRes->src() =~ /^\/adm\/navmaps/) { |
if ($suppressNavmap && $curRes->src() =~ /^\/adm\/navmaps/) { |
$curRes = $it->next(); |
|
next; |
next; |
} |
} |
|
|
Line 1168 sub render {
|
Line 1165 sub render {
|
|
|
} |
} |
} |
} |
|
} |
|
|
} else { |
|
# Not showing parts |
|
@parts = ("0"); # show main part only |
|
} |
|
|
|
# If the multipart problem was condensed, "forget" it was multipart |
# If the multipart problem was condensed, "forget" it was multipart |
if (scalar(@parts) == 1) { |
if (scalar(@parts) == 1) { |
$args->{'multipart'} = 0; |
$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 |
# Now, we've decided what parts to show. Loop through them and |
# show them. |
# show them. |
foreach my $part (@parts) { |
foreach my $part ('', @parts) { |
|
if ($part eq '0') { |
|
next; |
|
} |
$rownum ++; |
$rownum ++; |
my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)]; |
my $backgroundColor = $backgroundColors[$rownum % scalar(@backgroundColors)]; |
|
|
Line 1235 sub render {
|
Line 1223 sub render {
|
$result = ""; |
$result = ""; |
$r->rflush(); |
$r->rflush(); |
} |
} |
|
} continue { |
$curRes = $it->next(); |
$curRes = $it->next(); |
} |
} |
|
|
Line 2756 sub extractParts {
|
Line 2744 sub extractParts {
|
$self->{PARTS} = \@sortedParts; |
$self->{PARTS} = \@sortedParts; |
} |
} |
|
|
# Ensure part 0 is included at the beginning. |
|
if ($self->{PARTS}->[0] ne '0') { |
|
unshift @{$self->{PARTS}}, '0'; |
|
} |
|
|
|
return; |
return; |
} |
} |
|
|