--- loncom/interface/lonpreferences.pm 2009/10/08 21:15:19 1.125.4.6
+++ loncom/interface/lonpreferences.pm 2009/09/23 15:32:00 1.125.8.2
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.125.4.6 2009/10/08 21:15:19 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.125.8.2 2009/09/23 15:32:00 gci Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1290,8 +1290,6 @@ sub jscript_send {
this.document.client.elements.uname.value;
this.document.pserver.elements.udom.value =
this.document.client.elements.udom.options[this.document.client.elements.udom.selectedIndex].value;
- this.document.pserver.elements.email.value =
- this.document.client.elements.email.value;
|;
}
$ output .= qq|
@@ -1374,7 +1372,6 @@ sub server_form {
-
|;
}
@@ -1527,17 +1524,14 @@ ENDERROR
}
} else {
# error error: run in circles, scream and shout
+ $message = &Apache::lonhtmlcommon::confirm_success(
+ &mt("The password for user [_1] was not changed.",''.$user.'').' '.&mt('Please make sure your old password was entered correctly.'),1);
if ($caller eq 'reset_by_email') {
- if (!$result) {
- return 1;
- } else {
- return $result;
- }
+ $r->print($message.'
');
} else {
- $message = &Apache::lonhtmlcommon::confirm_success(
- &mt("The password for user [_1] was not changed.",''.$user.'').' '.&mt('Please make sure your old password was entered correctly.'),1);
$r->print(&Apache::loncommon::confirmwrapper($message));
}
+ return 1;
}
return;
}
@@ -1863,22 +1857,24 @@ sub handler {
printmenu => 'yes',
subroutine => \&verify_and_change_colors,
}));
- push (@Options,({ action => 'changelanguages',
- linktext => 'Change Language Preferences',
- href => '/adm/preferences',
- help => 'Prefs_Language',
- breadcrumb=>
- { href => '/adm/preferences?action=changelanguages',
- text => 'Change Language'},
- subroutine => \&languagechanger,
- },
- { action => 'verify_and_change_languages',
- breadcrumb=>
- {href => '/adm/preferences?action=changelanguages',
- text => 'Change Language'},
- printmenu => 'yes',
- subroutine=>\&verify_and_change_languages, }
+ if ($env{'user.adv'}) {
+ push (@Options,({ action => 'changelanguages',
+ linktext => 'Change Language Preferences',
+ href => '/adm/preferences',
+ help => 'Prefs_Language',
+ breadcrumb=>
+ { href => '/adm/preferences?action=changelanguages',
+ text => 'Change Language'},
+ subroutine => \&languagechanger,
+ },
+ { action => 'verify_and_change_languages',
+ breadcrumb=>
+ {href => '/adm/preferences?action=changelanguages',
+ text => 'Change Language'},
+ printmenu => 'yes',
+ subroutine=>\&verify_and_change_languages, }
));
+ }
push (@Options,({ action => 'changewysiwyg',
linktext => 'Change WYSIWYG Editor Preferences',
href => '/adm/preferences',
@@ -1971,22 +1967,23 @@ sub handler {
text => 'Change Main Menu'},
printmenu => 'yes',
}));
-
- push (@Options,({ action => 'changeclicker',
- linktext => 'Register Response Devices ("Clickers")',
- href => '/adm/preferences',
- subroutine => \&clickerchanger,
- breadcrumb =>
- { href => '/adm/preferences?action=changeclicker',
- text => 'Register Clicker'},
- },
- { action => 'verify_and_change_clicker',
- subroutine => \&verify_and_change_clicker,
- breadcrumb =>
- { href => '/adm/preferences?action=changeclicker',
- text => 'Register Clicker'},
- printmenu => 'yes',
- }));
+ if ($env{'user.adv'}) {
+ push (@Options,({ action => 'changeclicker',
+ linktext => 'Register Response Devices ("Clickers")',
+ href => '/adm/preferences',
+ subroutine => \&clickerchanger,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changeclicker',
+ text => 'Register Clicker'},
+ },
+ { action => 'verify_and_change_clicker',
+ subroutine => \&verify_and_change_clicker,
+ breadcrumb =>
+ { href => '/adm/preferences?action=changeclicker',
+ 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',