--- loncom/interface/lonpreferences.pm 2011/05/16 00:57:08 1.186.2.6
+++ loncom/interface/lonpreferences.pm 2010/06/19 23:28:12 1.190
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.186.2.6 2011/05/16 00:57:08 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.190 2010/06/19 23:28:12 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -591,107 +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 Menu Display'});
- $r->print(Apache::loncommon::start_page('Page Display Settings'));
- $r->print(Apache::lonhtmlcommon::breadcrumbs('Change Menu Display'));
-
- my $user = $env{'user.name'};
- my $domain = $env{'user.domain'};
- my %userenv = &Apache::lonnet::get('environment',['icons']);
- my $iconic='checked="checked"';
- my ($classic,$onlyicon,$iconic_preview,$iconsonly_preview);
- if ($userenv{'icons'} eq 'classic') {
- $iconic='';
- $classic='
'.
- &mt('Your current selection: "Use buttons and text" is deprecated - it is recommended that you change this to "Use icons and text".').'
';
- }
- if ($userenv{'icons'} eq 'iconsonly') {
- $onlyicon='checked="checked"';
- $iconic='';
- }
- my $change=&mt('Save');
- my %lt = &icon_options();
- my ($inlinetools,$toolsorder) = &icon_previews();
- if ((ref($inlinetools) eq 'HASH') && (ref($toolsorder) eq 'ARRAY')) {
- foreach my $tool (@{$toolsorder}) {
- my ($command,$row,$col,$img,$top,$bot,$act,$desc) =
- split(/\&/,$inlinetools->{$tool});
- $iconic_preview .= '';
- $iconsonly_preview .= '';
- }
- }
- $iconsonly_preview = '';
- $iconic_preview = '';
- $r->print(<
-
-$iconic_preview
-$iconsonly_preview
-
-
-ENDSCREEN
-}
-
-sub verify_and_change_icons {
- my $r = shift;
- my $user = $env{'user.name'};
- my $domain = $env{'user.domain'};
- my $newicons = $env{'form.menumode'};
- my %lt = &icon_options();
- my $newchoice = $newicons;
- if ($lt{$newicons}) {
- $newchoice = $lt{$newicons};
- }
- &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').'',''.$newchoice.''));
- $message=&Apache::loncommon::confirmwrapper($message);
- &print_main_menu($r, $message);
-}
-
-sub icon_options {
- my %lt = &Apache::lonlocal::texthash(
- iconic => 'Use icons and text',
- iconsonly => 'Use icons only',
- );
- return %lt;
-}
-
-sub icon_previews {
- my %icon_text = (
- annotate => 'Notes',
- bookmark => 'Bookmark',
- catalog => 'Info',
- evaluate => 'Evaluate',
- feedback => 'Communicate',
- printout => 'Print',
- );
- my %inlinetools = (
- printout => "s&8&3&prt.png&$icon_text{'printout'}&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document",
- bookmark => "s&9&1&sbkm.png&$icon_text{'bookmark'}&bookmark[_2]&set_bookmark()&Set a bookmark for this resource",
- evaluate => "s&8&1&eval.png&$icon_text{'evaluate'}&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource",
- feedback => "s&8&2&fdbk.png&$icon_text{'feedback'}&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource",
- annotate => "s&9&3&anot.png&$icon_text{'annotate'}&tations[_1]&annotate()&Make notes and annotations about this resource",
- catalog => "s&6&3&catalog.png&$icon_text{'catalog'}&info[_1]&catalog_info()&Show Metadata",
- );
- my @toolsorder = qw(annotate bookmark evaluate feedback printout catalog);
- return (\%inlinetools,\@toolsorder);
-}
-
-################################################################
# Clicker Subroutines #
################################################################
@@ -2045,13 +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 icons or icons and text.'
- }
]
},
{ categorytitle=>'Messages & Notifications',
@@ -2067,7 +1959,7 @@ my @menu=
url => '/adm/preferences?action=changediscussions',
permission => 'F',
#help => 'Change_Discussion_Display',
- icon => 'chat.png',
+ icon => 'mail-message-new.png',
linktitle => 'Set display preferences for discussion posts for both discussion boards and individual resources in all your courses.'
},
]
@@ -2095,26 +1987,6 @@ 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} }, {
@@ -2232,10 +2104,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'){