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

www lon-capa-cvs@mail.lon-capa.org
Thu, 29 Jan 2004 19:29:53 -0000


www		Thu Jan 29 14:29:53 2004 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  Course language preferences override user preferences
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.176 loncom/interface/loncommon.pm:1.177
--- loncom/interface/loncommon.pm:1.176	Wed Jan 28 11:18:29 2004
+++ loncom/interface/loncommon.pm	Thu Jan 29 14:29:53 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.176 2004/01/28 16:18:29 albertel Exp $
+# $Id: loncommon.pm,v 1.177 2004/01/29 19:29:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1845,12 +1845,12 @@
 
 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) {