| ');
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
@@ -3137,7 +3358,7 @@ sub store_course_settings {
my %SaveHash;
my %AppHash;
while (my ($setting,$type) = each(%$Settings)) {
- my $basename = 'env.internal.'.$prefix.'.'.$setting;
+ my $basename = 'internal.'.$prefix.'.'.$setting;
my $envname = 'course.'.$courseid.'.'.$basename;
if (exists($ENV{'form.'.$setting})) {
# Save this value away
@@ -3182,7 +3403,7 @@ sub restore_course_settings {
my ($prefix,$Settings) = @_;
while (my ($setting,$type) = each(%$Settings)) {
next if (exists($ENV{'form.'.$setting}));
- my $envname = 'course.'.$courseid.'.env.internal.'.$prefix.
+ my $envname = 'course.'.$courseid.'.internal.'.$prefix.
'.'.$setting;
if (exists($ENV{$envname})) {
if ($type eq 'scalar') {
@@ -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
|