--- loncom/interface/lonnavmaps.pm 2003/06/12 20:36:41 1.201
+++ loncom/interface/lonnavmaps.pm 2003/06/14 00:11:12 1.204
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.201 2003/06/12 20:36:41 bowersj2 Exp $
+# $Id: lonnavmaps.pm,v 1.204 2003/06/14 00:11:12 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -839,8 +839,8 @@ sub render_resource {
my $linkopen = "";
my $linkclose = "";
- # Default icon: HTML page
- my $icon = "
";
+ # Default icon: unknown page
+ my $icon = "
";
if ($resource->is_problem()) {
if ($part eq '0' || $params->{'condensed'}) {
@@ -848,6 +848,13 @@ sub render_resource {
} else {
$icon = $params->{'indentString'};
}
+ } else {
+ my $curfext= (split (/\./,$resource->src))[-1];
+ my $embstyle = &Apache::loncommon::fileembstyle($curfext);
+ # The unless conditional that follows is a bit of overkill
+ if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) {
+ $icon = "
";
+ }
}
# Display the correct map icon to open or shut map
@@ -923,7 +930,8 @@ sub render_resource {
$nonLinkedText .= ' (' . $resource->countParts() . ' parts)';
}
- if (!$params->{'resource_nolink'}) {
+ if (!$params->{'resource_nolink'} && $src !~ /^\/uploaded\// &&
+ !$resource->is_map()) {
$result .= " $curMarkerBegin$title$partLabel$curMarkerEnd $nonLinkedText";
} else {
$result .= " $curMarkerBegin$title$partLabel$curMarkerEnd $nonLinkedText";