| ');
if (defined($sone{$_})) { $r->print($sone{$_}."\n"); }
@@ -2730,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
@@ -3064,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.
@@ -3084,6 +3301,8 @@ Inputs:
=back
+=back
+
=cut
############################################################
@@ -3103,6 +3322,8 @@ sub chartlink {
=head1 Course Environment Routines
+=over 4
+
=item &restore_course_settings
=item &store_course_settings
@@ -3211,6 +3432,22 @@ sub propath {
return $proname;
}
+sub icon {
+ my ($file)=@_;
+ my $curfext = (split(/\./,$file))[-1];
+ my $iconname=$Apache::lonnet::perlvar{'lonIconsURL'}.'/unknown.gif';
+ my $embstyle = &Apache::loncommon::fileembstyle($curfext);
+ 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
=back
|