--- loncom/interface/loncommon.pm 2004/01/15 19:25:25 1.174 +++ loncom/interface/loncommon.pm 2004/01/29 19:29:53 1.177 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.174 2004/01/15 19:25:25 matthew Exp $ +# $Id: loncommon.pm,v 1.177 2004/01/29 19:29:53 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -593,7 +593,7 @@ sub help_open_topic { # Add the graphic $template .= <<"ENDTEMPLATE"; - (Help: $topic) + (Help: $topic) ENDTEMPLATE if ($text ne '') { $template.='' }; return $template; @@ -646,7 +646,6 @@ sub help_open_bug { { $link = $url; } - # Add the text if ($text ne "") { @@ -657,7 +656,7 @@ sub help_open_bug { # Add the graphic $template .= <<"ENDTEMPLATE"; - (Bug: $topic) + (Bug: $topic) ENDTEMPLATE if ($text ne '') { $template.='' }; return $template; @@ -700,7 +699,7 @@ sub help_open_faq { # Add the graphic $template .= <<"ENDTEMPLATE"; - (FAQ: $topic) + (FAQ: $topic) ENDTEMPLATE if ($text ne '') { $template.='' }; return $template; @@ -1846,13 +1845,13 @@ sub display_languages { sub preferred_languages { my @languages=(); - if ($ENV{'environment.languages'}) { - @languages=split(/\s*(\,|\;|\:)\s*/,$ENV{'environment.languages'}); - } if ($ENV{'course.'.$ENV{'request.course.id'}.'.languages'}) { @languages=(@languages,split(/\s*(\,|\;|\:)\s*/, $ENV{'course.'.$ENV{'request.course.id'}.'.languages'})); } + if ($ENV{'environment.languages'}) { + @languages=split(/\s*(\,|\;|\:)\s*/,$ENV{'environment.languages'}); + } my $browser=(split(/\;/,$ENV{'HTTP_ACCEPT_LANGUAGE'}))[0]; if ($browser) { @languages=(@languages,split(/\s*(\,|\;|\:)\s*/,$browser)); @@ -3359,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 @@ -3404,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') {