--- loncom/interface/lonpreferences.pm 2009/10/09 13:09:01 1.125.2.4
+++ loncom/interface/lonpreferences.pm 2009/09/16 21:04:27 1.125.6.2
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.125.2.4 2009/10/09 13:09:01 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
#
@@ -1248,8 +1248,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|
@@ -1334,7 +1332,6 @@ sub server_form {
-
|;
}
@@ -1481,16 +1478,9 @@ ENDERROR
$r->print("
".&mt('The password for [_1] was successfully changed',$user)."
");
} else {
# error error: run in circles, scream and shout
- if ($caller eq 'reset_by_email') {
- if (!$result) {
- return 1;
- } else {
- return $result;
- }
- } else {
- $r->print("".&mt("The password for [_1] was not changed",$user)."
".
- &mt('Please make sure your old password was entered correctly.'));
- }
+ $r->print("".&mt("The password for [_1] was not changed",$user)."
".
+ &mt('Please make sure your old password was entered correctly.'));
+ return 1;
}
return;
}
@@ -1816,7 +1806,8 @@ sub handler {
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',
@@ -1832,6 +1823,7 @@ sub handler {
printmenu => 'yes',
subroutine=>\&verify_and_change_languages, }
));
+ }
push (@Options,({ action => 'changewysiwyg',
linktext => 'Change WYSIWYG Editor Preferences',
href => '/adm/preferences',
@@ -1863,9 +1855,9 @@ sub handler {
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,
@@ -1881,7 +1873,7 @@ sub handler {
printmenu => 'yes',
}));
- push (@Options,({ action => 'changetexenginepref',
+ push (@Options,({ action => 'changetexenginepref',
linktext => 'Change How Math Equations Are Displayed',
href => '/adm/preferences',
subroutine => \&texenginechanger,
@@ -1897,16 +1889,17 @@ sub handler {
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',
@@ -1924,8 +1917,8 @@ sub handler {
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,
@@ -1940,9 +1933,9 @@ sub handler {
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,
@@ -1957,6 +1950,7 @@ sub handler {
text => 'Restrict Domain Coordinator Access'},
printmenu => 'yes',
}));
+ }
}
push (@Options,({ action => 'lockwarning',