[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm

www lon-capa-cvs@mail.lon-capa.org
Wed, 18 Jun 2003 15:50:07 -0000


www		Wed Jun 18 11:50:07 2003 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Bug #1833: actually look into the course environment to get language
  preferences.
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.103 loncom/interface/loncommon.pm:1.104
--- loncom/interface/loncommon.pm:1.103	Thu Jun  5 22:24:49 2003
+++ loncom/interface/loncommon.pm	Wed Jun 18 11:50:07 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.103 2003/06/06 02:24:49 www Exp $
+# $Id: loncommon.pm,v 1.104 2003/06/18 15:50:07 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1355,6 +1355,12 @@
     my %languages=();
     if ($ENV{'environment.languages'}) {
 	foreach (split(/\s*(\,|\;|\:)\s*/,$ENV{'environment.languages'})) {
+	    $languages{$_}=1;
+        }
+    }
+    if ($ENV{'course.'.$ENV{'request.course.id'}.'.languages'}) {
+	foreach (split(/\s*(\,|\;|\:)\s*/,
+	$ENV{'course.'.$ENV{'request.course.id'}.'.languages'})) {
 	    $languages{$_}=1;
         }
     }