--- loncom/interface/lonpreferences.pm 2010/03/12 15:09:23 1.186 +++ loncom/interface/lonpreferences.pm 2010/08/15 00:10:08 1.186.2.4 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.186 2010/03/12 15:09:23 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.186.2.4 2010/08/15 00:10:08 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -166,11 +166,12 @@ sub languagechanger { = &Apache::loncommon::plainlanguagedescription($_); } } + %langchoices = &Apache::lonlocal::texthash(%langchoices); my $selectionbox= &Apache::loncommon::select_form( $language, 'language', - &Apache::lonlocal::texthash(%langchoices)); + \%langchoices); $r->print(< @@ -229,11 +230,12 @@ sub texenginechanger { 'mimetex' => 'mimetex (Convert to Images)', 'raw' => 'Raw (Screen Reader)' ); + %mathchoices = &Apache::lonlocal::texthash(%mathchoices); my $selectionbox= &Apache::loncommon::select_form( $texengine, 'texengine', - &Apache::lonlocal::texthash(%mathchoices)); + \%mathchoices); my $jsMath_start=&Apache::lontexconvert::jsMath_header(); my %lt=&Apache::lonlocal::texthash( 'headline' => 'Change how math is displayed', @@ -589,60 +591,6 @@ sub verify_and_change_screenname { } ################################################################ -# 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 -} - -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]',''.&mt('Menu Display').'',''.$newicons.'')); - $message=&Apache::loncommon::confirmwrapper($message); - &print_main_menu($r, $message); -} - -################################################################ # Clicker Subroutines # ################################################################ @@ -1975,14 +1923,14 @@ my @menu= url => '/adm/preferences?action=changerolespref', permission => 'F', #help => '', - icon => 'sctr.png', + icon => 'role_hotlist.png', linktitle => 'Configure the roles hotlist.' }, { linktext => 'Math display settings', url => '/adm/preferences?action=changetexenginepref', permission => 'F', #help => '', - icon => 'stat.png', + icon => 'dismath.png', linktitle => 'Change how math is displayed.' }, ] @@ -1996,14 +1944,6 @@ my @menu= 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 & Notifications', @@ -2047,6 +1987,26 @@ push(@{ $menu[0]->{items} }, { linktitle => 'Change your password.', }); } + if ($env{'environment.remote'} eq 'off') { +push(@{ $menu[1]->{items} }, { + linktext => 'Launch Remote Control', + url => '/adm/remote?url=/adm/preferences&action=launch', + permission => 'F', + #help => '', + icon => 'remotecontrol.png', + linktitle => 'Launch the remote control for LON-CAPA.', + }); + }else{ +push(@{ $menu[1]->{items} }, { + linktext => 'Collapse Remote Control', + url => '/adm/remote?url=/adm/preferences&action=collapse', + permission => 'F', + #help => '', + icon => 'remotecontrol.png', + linktitle => 'Collapse the remote control for LON-CAPA.', + }); + } + if (&can_toggle_namelocking()) { push(@{ $menu[0]->{items} }, { @@ -2079,7 +2039,7 @@ push(@{ $menu[4]->{items} }, { url => '/adm/preferences?action=changecourseinit', permission => 'F', #help => '', - icon => 'edit-copy.png', + icon => 'course_ini.png', linktitle => 'Set the default page to be displayed when you select a course role.', }); @@ -2164,10 +2124,6 @@ sub handler { &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'){