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

raeburn raeburn@source.lon-capa.org
Thu, 27 May 2010 15:55:29 -0000


raeburn		Thu May 27 15:55:29 2010 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/interface	lonpreferences.pm 
  Log:
  - Backport 1.187.
  
  
Index: loncom/interface/lonpreferences.pm
diff -u loncom/interface/lonpreferences.pm:1.186.2.1 loncom/interface/lonpreferences.pm:1.186.2.2
--- loncom/interface/lonpreferences.pm:1.186.2.1	Thu May 27 15:52:35 2010
+++ loncom/interface/lonpreferences.pm	Thu May 27 15:55:29 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Preferences
 #
-# $Id: lonpreferences.pm,v 1.186.2.1 2010/05/27 15:52:35 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.186.2.2 2010/05/27 15:55:29 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -589,60 +589,6 @@
 }
 
 ################################################################
-#                     Icon Subroutines                         #
-################################################################
-sub iconchanger {
-    my $r = shift;
-    &Apache::lonhtmlcommon::add_breadcrumb(
-	    {	href => '/adm/preferences?action=changeicons',
-                text => 'Change Main Menu'});
-    $r->print(Apache::loncommon::start_page('Page Display Settings'));
-    $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Main Menu'));
-
-    my $user       = $env{'user.name'};
-    my $domain     = $env{'user.domain'};
-    my %userenv = &Apache::lonnet::get
-        ('environment',['icons']);
-    my $iconic='checked="checked"';
-    my $classic='';
-    my $onlyicon='';
-    if ($userenv{'icons'} eq 'classic') {
-       $classic='checked="checked"';
-       $iconic='';
-    }
-    if ($userenv{'icons'} eq 'iconsonly') {
-       $onlyicon='checked="checked"';
-       $iconic='';
-    }
-    my $useicons=&mt('Use icons and text');
-    my $usebuttons=&mt('Use buttons and text');
-    my $useicononly=&mt('Use icons only');
-    my $change=&mt('Save');
-    $r->print(<<ENDSCREEN);
-<form name="prefs" action="/adm/preferences" method="post">
-<input type="hidden" name="action" value="verify_and_change_icons" />
-<label><input type="radio" name="menumode" value="iconic" $iconic /> $useicons</label><br />
-<label><input type="radio" name="menumode" value="classic" $classic /> $usebuttons</label><br />
-<label><input type="radio" name="menumode" value="iconsonly" $onlyicon /> $useicononly</label><br />
-<input type="submit" value="$change" />
-</form>
-ENDSCREEN
-}
-
-sub verify_and_change_icons {
-    my $r = shift;
-    my $user       = $env{'user.name'};
-    my $domain     = $env{'user.domain'};
-    my $newicons   = $env{'form.menumode'};
-
-    &Apache::lonnet::put('environment',{'icons' => $newicons});
-    &Apache::lonnet::appenv({'environment.icons' => $newicons});
-    my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]','<i>'.&mt('Menu Display').'</i>','<tt>'.$newicons.'</tt>'));
-    $message=&Apache::loncommon::confirmwrapper($message);
-    &print_main_menu($r, $message);
-}
-
-################################################################
 #                     Clicker Subroutines                      #
 ################################################################
 
@@ -1996,14 +1942,6 @@
 		icon => 'preferences-desktop-theme.png',
 		linktitle => 'Change LON-CAPA default colors.'
 	    },
-	    {	linktext => 'Menu Display',
-		url => '/adm/preferences?action=changeicons',
-		permission => 'F',
-		#help => '',
-		icon => 'preferences-system-windows.png',
-		linktitle => 'Change whether the menus are displayed with buttons, icons or icons and text.'
-	    }
-
 		]
     },
     {	categorytitle=>'Messages &amp; Notifications',
@@ -2184,10 +2122,6 @@
         &texenginechanger($r);
     }elsif($env{'form.action'} eq 'verify_and_change_texengine'){
         &verify_and_change_texengine($r);
-    }elsif($env{'form.action'} eq 'changeicons'){
-        &iconchanger($r);
-    }elsif($env{'form.action'} eq 'verify_and_change_icons'){
-        &verify_and_change_icons($r);
     }elsif($env{'form.action'} eq 'changeclicker'){
         &clickerchanger($r);
     }elsif($env{'form.action'} eq 'verify_and_change_clicker'){