--- loncom/interface/lonpreferences.pm 2009/05/16 23:21:00 1.163
+++ loncom/interface/lonpreferences.pm 2009/10/08 19:54:37 1.173
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.163 2009/05/16 23:21:00 bisitz Exp $
+# $Id: lonpreferences.pm,v 1.173 2009/10/08 19:54:37 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -217,7 +217,8 @@ sub texenginechanger {
'tth' => 'tth (TeX to HTML)',
#'ttm' => 'TeX to MathML',
'jsMath' => 'jsMath',
- 'mimetex' => 'mimetex (Convert to Images)'
+ 'mimetex' => 'mimetex (Convert to Images)',
+ 'raw' => 'Raw (Screen Reader)'
);
my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine',
%mathchoices);
@@ -1337,6 +1338,8 @@ 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|
@@ -1355,42 +1358,42 @@ sub client_form {
'currentpass' => 'Current Password',
'newpass' => 'New Password',
'confirmpass' => 'Confirm Password',
- 'changepass' => 'Save');
+ 'changepass' => 'Save',
+ );
- my $output = qq|
-
-ENDFORM
+|;
return $output;
}
@@ -1421,6 +1424,7 @@ sub server_form {
+
|;
}
@@ -1565,7 +1569,7 @@ ENDERROR
# Inform the user the password has (not?) been changed
my $message;
if ($result =~ /^ok$/) {
- $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.',''.$user.''));
+ $message = &Apache::lonhtmlcommon::confirm_success(&mt('The password for user [_1] was successfully changed.',''.$user.''));
if ($caller eq 'reset_by_email') {
$r->print($message.'
');
} else {
@@ -1573,13 +1577,18 @@ 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);
- unless ($caller eq 'reset_by_email') {
+ if ($caller eq 'reset_by_email') {
+ if (!$result) {
+ return 1;
+ } else {
+ return $result;
+ }
+ } 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);
$message=&Apache::loncommon::confirmwrapper($message);
&print_main_menu($r, $message);
}
- return 1;
}
return;
}
@@ -1607,7 +1616,7 @@ sub discussionchanger {
}
}
if (defined($userenv{'discmarkread'})) {
- unless ($userenv{'discdisplay'} eq '') {
+ unless ($userenv{'discmarkread'} eq '') {
$discmark = $userenv{'discmarkread'};
}
}
@@ -1651,7 +1660,7 @@ sub discussionchanger {
$currmark = $lt{'ondisp'};
$newmark = 'onmark';
}
-
+
$r->print(<<"END");