| ');
if (defined($sone{$_})) { $r->print($sone{$_}."\n"); }
@@ -2729,8 +2939,12 @@ sub check_if_partid_hidden {
=pod
+=back
+
=head1 cgi-bin script and graphing routines
+=over 4
+
=item get_cgi_id
Inputs: none
@@ -3063,10 +3277,14 @@ sub DrawXYYGraph {
=pod
+=back
+
=head1 Statistics helper routines?
Bad place for them but what the hell.
+=over 4
+
=item &chartlink
Returns a link to the chart for a specific student.
@@ -3083,6 +3301,8 @@ Inputs:
=back
+=back
+
=cut
############################################################
@@ -3102,6 +3322,8 @@ sub chartlink {
=head1 Course Environment Routines
+=over 4
+
=item &restore_course_settings
=item &store_course_settings
@@ -3212,14 +3434,18 @@ sub propath {
sub icon {
my ($file)=@_;
- my @file_ext = split(/\./,$file);
- my $curfext = $file_ext[-1];
- my $iconname="unknown.gif";
+ my $curfext = (split(/\./,$file))[-1];
+ my $iconname=$Apache::lonnet::perlvar{'lonIconsURL'}.'/unknown.gif';
my $embstyle = &Apache::loncommon::fileembstyle($curfext);
- # The unless conditional that follows is a bit of overkill
- $iconname = $curfext.".gif" unless
- (!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn');
- return $Apache::lonnet::perlvar{'lonIconsURL'}."/$iconname";
+ if (!(!defined($embstyle) || $embstyle eq 'unk' || $embstyle eq 'hdn')) {
+ if (-e $Apache::lonnet::perlvar{'lonDocRoot'}.'/'.
+ $Apache::lonnet::perlvar{'lonIconsURL'}.'/'.
+ $curfext.".gif") {
+ $iconname=$Apache::lonnet::perlvar{'lonIconsURL'}.'/'.
+ $curfext.".gif";
+ }
+ }
+ return $iconname;
}
=pod
|