version 1.76, 2002/10/14 14:14:49
|
version 1.78, 2002/10/14 17:34:10
|
Line 977 sub new_handle {
|
Line 977 sub new_handle {
|
my $now = time(); |
my $now = time(); |
my $in24Hours = $now + 24 * 60 * 60; |
my $in24Hours = $now + 24 * 60 * 60; |
my $depth = 1; |
my $depth = 1; |
|
my $displayedHereMarker = 0; |
|
|
# We know the first thing is a BEGIN_MAP (see "$self->{STARTED}" |
# We know the first thing is a BEGIN_MAP (see "$self->{STARTED}" |
# code in iterator->next), so ignore the first one |
# code in iterator->next), so ignore the first one |
Line 1076 sub new_handle {
|
Line 1077 sub new_handle {
|
} else { |
} else { |
@parts[0] = "0"; # this is to get past foreach loop below |
@parts[0] = "0"; # this is to get past foreach loop below |
# you can consider a non-problem resource as a resource |
# you can consider a non-problem resource as a resource |
# with only one part without loss |
# with only one part without loss |
} |
} |
|
|
# Display one part, in event of network error. |
# Display one part, in event of network error. |
Line 1132 sub new_handle {
|
Line 1133 sub new_handle {
|
my $mapId = $curRes->map_pc(); |
my $mapId = $curRes->map_pc(); |
my $nowOpen = !defined($filterHash{$mapId}); |
my $nowOpen = !defined($filterHash{$mapId}); |
$icon = $nowOpen ? |
$icon = $nowOpen ? |
"folder_closed.gif" : "folder_opened.gif"; |
"navmap.folder.closed.gif" : "navmap.folder.open.gif"; |
$icon = "<img src=\"/adm/lonIcons/$icon\" alt=\"\" border=\"0\" />"; |
$icon = "<img src=\"/adm/lonIcons/$icon\" alt=\"\" border=\"0\" />"; |
$linkopen = "<a href=\"/adm/navmaps?filter="; |
$linkopen = "<a href=\"/adm/navmaps?filter="; |
$linkopen .= ($nowOpen xor $condition) ? |
$linkopen .= ($nowOpen xor $condition) ? |
Line 1165 sub new_handle {
|
Line 1166 sub new_handle {
|
} |
} |
|
|
# FIRST COL: The resource indentation, branch icon, and name |
# FIRST COL: The resource indentation, branch icon, and name |
$r->print(" <tr><td align=\"left\" valign=\"bottom\">\n"); |
$r->print(" <tr><td align=\"left\" valign=\"center\">\n"); |
|
|
# print indentation |
# print indentation |
for (my $i = 0; $i < $indentLevel - $deltalevel; $i++) { |
for (my $i = 0; $i < $indentLevel - $deltalevel; $i++) { |
Line 1178 sub new_handle {
|
Line 1179 sub new_handle {
|
my $curMarkerEnd = ""; |
my $curMarkerEnd = ""; |
|
|
# Is this the current resource? |
# Is this the current resource? |
if ($curRes->src() eq $currenturl) { |
if ($curRes->src() eq $currenturl && !$displayedHereMarker) { |
$curMarkerBegin = '<a name="curloc" /><font color="red" size="+2">> </font>'; |
$curMarkerBegin = '<a name="curloc" /><font color="red" size="+2">> </font>'; |
$curMarkerEnd = '<font color="red" size="+2"> <</font>'; |
$curMarkerEnd = '<font color="red" size="+2"> <</font>'; |
|
$displayedHereMarker = 1; |
} |
} |
|
|
if ($curRes->is_problem() && $part ne "0" && !$condensed) { |
if ($curRes->is_problem() && $part ne "0" && !$condensed) { |
Line 1219 sub new_handle {
|
Line 1221 sub new_handle {
|
} |
} |
} |
} |
|
|
$r->print("<td align=\"left\" valign=\"bottom\">$discussionHTML$feedbackHTML</td>"); |
$r->print("<td align=\"left\" valign=\"center\">$discussionHTML$feedbackHTML</td>"); |
|
|
# Is this the first displayed part of a multi-part problem |
# Is this the first displayed part of a multi-part problem |
# that has not been condensed, so we should suppress these two |
# that has not been condensed, so we should suppress these two |
Line 1232 sub new_handle {
|
Line 1234 sub new_handle {
|
my $icon = $statusIconMap{$curRes->status($part)}; |
my $icon = $statusIconMap{$curRes->status($part)}; |
my $alt = $iconAltTags{$icon}; |
my $alt = $iconAltTags{$icon}; |
if ($icon) { |
if ($icon) { |
$r->print("<td valign=\"bottom\" width=\"50\" align=\"right\">$linkopen<img src=\"/adm/lonIcons/$icon\" border=\"0\" alt=\"$alt\" />$linkclose</td>\n"); |
$r->print("<td valign=\"center\" width=\"50\" align=\"right\">$linkopen<img src=\"/adm/lonIcons/$icon\" border=\"0\" alt=\"$alt\" />$linkclose</td>\n"); |
} else { |
} else { |
$r->print("<td></td>\n"); |
$r->print("<td></td>\n"); |
} |
} |
Line 1241 sub new_handle {
|
Line 1243 sub new_handle {
|
} |
} |
|
|
# FOURTH COL: Text description |
# FOURTH COL: Text description |
$r->print("<td $colorizer align=\"right\" valign=\"bottom\">\n"); |
$r->print("<td $colorizer align=\"right\" valign=\"center\">\n"); |
|
|
if ($curRes->kind() eq "res" && |
if ($curRes->kind() eq "res" && |
$curRes->is_problem() && |
$curRes->is_problem() && |