[LON-CAPA-cvs] cvs: loncom(GCI_1) /interface lonpreferences.pm

raeburn raeburn@source.lon-capa.org
Wed, 16 Sep 2009 21:04:27 -0000


raeburn		Wed Sep 16 21:04:27 2009 EDT

  Modified files:              (Branch: GCI_1)
    /loncom/interface	lonpreferences.pm 
  Log:
  - Customization for GCI_1.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.125.6.1 loncom/interface/lonpreferences.pm:1.125.6.2
--- loncom/interface/lonpreferences.pm:1.125.6.1	Wed Sep 16 20:49:18 2009
+++ loncom/interface/lonpreferences.pm	Wed Sep 16 21:04:27 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.125.6.1 2009/09/16 20:49:18 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.125.6.2 2009/09/16 21:04:27 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1806,7 +1806,8 @@
                       printmenu => 'yes',
                       subroutine => \&verify_and_change_colors,
                       }));
-    push (@Options,({ action => 'changelanguages',
+    if ($env{'user.adv'}) {
+        push (@Options,({ action => 'changelanguages',
                       linktext => 'Change Language Preferences',
                       href => '/adm/preferences',
 		      help => 'Prefs_Language',
@@ -1822,6 +1823,7 @@
                       printmenu => 'yes',
                       subroutine=>\&verify_and_change_languages, }
                     ));
+    }
     push (@Options,({ action => 'changewysiwyg',
                       linktext => 'Change WYSIWYG Editor Preferences',
                       href => '/adm/preferences',
@@ -1853,9 +1855,9 @@
                       printmenu => 'yes',
                       subroutine => \&verify_and_change_discussion, }
                     ));
-
-    my $role = ($env{'user.adv'} ? 'Roles' : 'Course');
-    push (@Options,({ action   => 'changerolespref',
+    if ($env{'user.adv'}) {
+        my $role = ($env{'user.adv'} ? 'Roles' : 'Course');
+        push (@Options,({ action   => 'changerolespref',
                       linktext => 'Change '.$role.' Page Preferences',
                       href     => '/adm/preferences',
                       subroutine => \&rolesprefchanger,
@@ -1871,7 +1873,7 @@
                       printmenu => 'yes',
                       }));
 
-    push (@Options,({ action   => 'changetexenginepref',
+        push (@Options,({ action   => 'changetexenginepref',
                       linktext => 'Change How Math Equations Are Displayed',
                       href     => '/adm/preferences',
                       subroutine => \&texenginechanger,
@@ -1887,16 +1889,17 @@
                       printmenu => 'yes',
                       }));
 
-    if ($env{'environment.remote'} eq 'off') {
-	push (@Options,({ action => 'launch',
-			  linktext => 'Launch Remote Control',
-			  href => '/adm/remote?url=/adm/preferences',
-		      }));
-    } else {
-	push (@Options,({ action => 'collapse',
+        if ($env{'environment.remote'} eq 'off') {
+	    push (@Options,({ action => 'launch',
+	   		      linktext => 'Launch Remote Control',
+			      href => '/adm/remote?url=/adm/preferences',
+		          }));
+        } else {
+	    push (@Options,({ action => 'collapse',
 			  linktext => 'Collapse Remote Control',
 			  href => '/adm/remote?url=/adm/preferences',
-		      }));
+		          }));
+        }
     }
 
     push (@Options,({ action   => 'changeicons',
@@ -1914,8 +1917,8 @@
                             text => 'Change Main Menu'},
                       printmenu => 'yes',
                       }));
-
-    push (@Options,({ action   => 'changeclicker',
+    if ($env{'user.adv'}) {
+        push (@Options,({ action   => 'changeclicker',
                       linktext => 'Register Response Devices ("Clickers")',
                       href     => '/adm/preferences',
                       subroutine => \&clickerchanger,
@@ -1930,9 +1933,9 @@
                             text => 'Register Clicker'},
                       printmenu => 'yes',
                       }));
-    my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']);
-    if (keys(%author_roles) > 0) {
-      push (@Options,({ action   => 'changedomcoord',
+        my %author_roles = &Apache::lonnet::get_my_roles($user,$domain,'userroles','',['au']);
+        if (keys(%author_roles) > 0) {
+            push (@Options,({ action   => 'changedomcoord',
                         linktext => 'Restrict Domain Coordinator Access',
                         href     => '/adm/preferences',
                         subroutine => \&domcoordchanger,
@@ -1947,6 +1950,7 @@
                               text => 'Restrict Domain Coordinator Access'},
                         printmenu => 'yes',
                       }));
+        }
     }
 
     push (@Options,({ action   => 'lockwarning',