--- loncom/interface/lonpreferences.pm 2009/05/20 15:05:19 1.125.4.1
+++ loncom/interface/lonpreferences.pm 2009/10/08 21:15:19 1.125.4.6
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.125.4.1 2009/05/20 15:05:19 raeburn Exp $
+# $Id: lonpreferences.pm,v 1.125.4.6 2009/10/08 21:15:19 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -204,7 +204,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);
@@ -687,6 +688,12 @@ sub verify_and_change_domcoord {
if ($env{'form.construction'}) { $domcoord{'domcoord.author'}='blocked'; }
&Apache::lonnet::put('environment',\%domcoord);
&Apache::lonnet::appenv({'environment.domcoord.author' => $domcoord{'domcoord.author'}});
+ my $status='';
+ if ($domcoord{'domcoord.author'} eq 'blocked') {
+ $status=&mt('on');
+ } else {
+ $status=&mt('off');
+ }
my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Block access to construction space').'',''.$status.''));
$message=&Apache::loncommon::confirmwrapper($message);
$r->print(< 'New Password',
'confirmpass' => 'Confirm Password',
'changepass' => 'Save');
-
- my $output = qq|
-
-ENDFORM
+|;
return $output;
}
@@ -1367,6 +1374,7 @@ sub server_form {
+
|;
}
@@ -1509,8 +1517,9 @@ ENDERROR
my $result = &Apache::lonnet::changepass
($user,$domain,$currentpass,$newpass1,$homeserver,$caller);
# 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 {
@@ -1518,14 +1527,17 @@ 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') {
- $r->print($message.'
');
+ 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);
$r->print(&Apache::loncommon::confirmwrapper($message));
}
- return 1;
}
return;
}
@@ -1548,7 +1560,7 @@ sub discussionchanger {
}
}
if (defined($userenv{'discmarkread'})) {
- unless ($userenv{'discdisplay'} eq '') {
+ unless ($userenv{'discmarkread'} eq '') {
$discmark = $userenv{'discmarkread'};
}
}
@@ -1638,11 +1650,11 @@ sub verify_and_change_discussion {
if (defined($env{'form.discdisp'}) ) {
my $newdisp = $env{'form.newdisp'};
if ($newdisp eq 'unread') {
- $message .=&mt('In discussions: only new posts will be displayed.').'
';
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: only new posts will be displayed.')).'
';
&Apache::lonnet::put('environment',{'discdisplay' => $newdisp});
&Apache::lonnet::appenv({'environment.discdisplay' => $newdisp});
} else {
- $message .= &mt('In discussions: all posts will be displayed.').'
';
+ $message .= &Apache::lonhtmlcommon::confirm_success(&mt('In discussions: all posts will be displayed.')).'
';
&Apache::lonnet::del('environment',['discdisplay']);
&Apache::lonnet::delenv('environment.discdisplay');
}
@@ -1742,7 +1754,7 @@ sub verify_and_change_coursepage {
$refpage.'">'.$lt{'dasp'}.'';
}
}
- $message = &Apache::lonhtmlcommon::confirm_success($message)
+ $message = &Apache::lonhtmlcommon::confirm_success($message);
$r->print(<