[LON-CAPA-cvs] cvs: loncom /interface lonnavmaps.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Sat, 14 Jun 2003 00:11:12 -0000
albertel Fri Jun 13 20:11:12 2003 EDT
Modified files:
/loncom/interface lonnavmaps.pm
Log:
- more icon issues, want to use unknown.gif on unknown extensions, otherwise use the icon we have.
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.203 loncom/interface/lonnavmaps.pm:1.204
--- loncom/interface/lonnavmaps.pm:1.203 Fri Jun 13 09:58:06 2003
+++ loncom/interface/lonnavmaps.pm Fri Jun 13 20:11:12 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.203 2003/06/13 13:58:06 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 @@
my $linkopen = "<a href='$link'>";
my $linkclose = "</a>";
- # Default icon: HTML page
- my $icon = "<img src='/adm/lonIcons/html.gif' alt='' border='0' />";
+ # Default icon: unknown page
+ my $icon = "<img src='/adm/lonIcons/unknown.gif' alt='' border='0' />";
if ($resource->is_problem()) {
if ($part eq '0' || $params->{'condensed'}) {
@@ -848,6 +848,13 @@
} 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 = "<img src='/adm/lonIcons/$curfext.gif' alt='' border='0' />";
+ }
}
# Display the correct map icon to open or shut map