');
+ my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('WYSIWYG Editor').'',''.&mt($newsetting).''));
+ $message=&Apache::loncommon::confirmwrapper($message);
+ $r->print(< $pref: $selectionbox
ENDLSCREEN
- $r->print(' ');
+ $r->print(' ');
}
@@ -173,12 +177,14 @@ sub verify_and_change_languages {
if ($newlanguage) {
&Apache::lonnet::put('environment',{'languages' => $newlanguage});
&Apache::lonnet::appenv({'environment.languages' => $newlanguage});
- $message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".';
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred language').'','"'.$newlanguage.'".'));
} else {
&Apache::lonnet::del('environment',['languages']);
- &Apache::lonnet::delenv('environment\.languages');
- $message=&mt('Reset preferred language.');
+ &Apache::lonnet::delenv('environment.languages');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred language').''));
}
+ $message=&Apache::loncommon::confirmwrapper($message);
+ &Apache::loncommon::flush_langs_cache($user,$domain);
$r->print(< '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);
@@ -206,20 +213,36 @@ sub texenginechanger {
my %lt=&Apache::lonlocal::texthash(
'headline' => 'Change Math Preferences',
'preftxt' => 'Preferred method to display Math',
- 'change' => 'Change',
+ 'change' => 'Save',
'exmpl' => 'Examples',
'jsmath' => 'jsMath:',
'tth' => 'tth (TeX to HTML):',
'mimetex' => 'mimetex (Convert to Images):',
);
+ my $jsMathWarning='
'
+ .'
'
+ .&mt("It looks like you don't have the TeX math fonts installed.")
+ .'
'
+ .'
'
+ .&mt('The jsMath example on this page may not look right without them. '
+ .'The [_1]jsMath Home Page[_2] has information on how to download the '
+ .'needed fonts. In the meantime, jsMath will do the best it can '
+ .'with the fonts you have, but it may not be pretty and some equations '
+ .'may not be rendered correctly.'
+ ,''
+ ,'')
+ .'
'
+ .'';
+
$r->print(<$lt{'headline'}
@@ -231,18 +254,7 @@ $lt{'exmpl'}
$jsMath_start
@@ -282,14 +294,13 @@ sub verify_and_change_texengine {
if ($newtexengine) {
&Apache::lonnet::put('environment',{'texengine' => $newtexengine});
&Apache::lonnet::appenv({'environment.texengine' => $newtexengine});
- $message=&mt('Set new preferred math display to ').'"'.$newtexengine.'".';
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Preferred method to display Math').'','"'.$newtexengine.'"'));
} else {
&Apache::lonnet::del('environment',['texengine']);
- &Apache::lonnet::delenv('environment\.texengine');
- $message=&mt('Reset preferred math display.');
+ &Apache::lonnet::delenv('environment.texengine');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Preferred method to display Math').''));
}
-
-
+ $message=&Apache::loncommon::confirmwrapper($message);
$r->print(<'.
- "".
"
".
@@ -363,10 +374,10 @@ sub rolesprefchanger {
$r->print('
'.&mt('Some LON-CAPA users have a long list of '.$lc_role.'s. The Recent '.$role.'s Hotlist feature keeps track of the last N '.$lc_role.'s which have been visited and places a table of these at the top of the '.$lc_role.'s page. People with very few '.$lc_role.'s should leave this feature disabled.').'
-');
}
@@ -424,7 +435,7 @@ sub verify_and_change_rolespref {
$message=&mt('Recent '.$role.'s Hotlist is Enabled');
} else {
&Apache::lonnet::del('environment',['recentroles']);
- &Apache::lonnet::delenv('environment\.recentroles');
+ &Apache::lonnet::delenv('environment.recentroles');
$message=&mt('Recent '.$role.'s Hotlist is Disabled');
}
if ($hotlist_n) {
@@ -454,7 +465,7 @@ sub verify_and_change_rolespref {
# Unset any roles that were previously frozen but aren't in list
foreach my $role_key (sort(keys(%recent_roles))) {
if (($frozen_roles{$role_key}) && (!exists($freeze{$role_key}))) {
- $message .= " ".&mt('Unfreezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= " ".&Apache::lonhtmlcommon::confirm_success(&mt('Unfreezing '.$role.': [_1]',''.$role_text{$role_key}.''));
&Apache::lonhtmlcommon::store_recent('roles',$role_key,' ',0);
}
}
@@ -462,13 +473,13 @@ sub verify_and_change_rolespref {
# Freeze selected roles
foreach my $role_key (@freeze_list) {
if (!$frozen_roles{$role_key}) {
- $message .= " ".&mt('Freezing '.$role.': [_1]',$role_text{$role_key})."\n";
+ $message .= " ".
+ &Apache::lonhtmlcommon::confirm_success(&mt('Freezing '.$role.': [_1]',''.$role_text{$role_key}.''));
&Apache::lonhtmlcommon::store_recent('roles',
$role_key,' ',1);
}
}
- $message .= " \n";
-
+ $message=&Apache::loncommon::confirmwrapper($message);
$r->print(< 'New screenname (shown if you post anonymously):',
- text_nickname => 'New nickname (shown if you post non-anonymously):',
- text_submit => 'Change',
- );
- $r->print(<
-
- $lt{'text_screenname'}
-
- $lt{'text_nickname'}
-
-
-
-
-ENDSCREEN
+ $r->print('
'
+ .&mt('Change the name that is displayed in your posts.')
+ .'
'
+ );
+ $r->print(''
+ );
}
sub verify_and_change_screenname {
@@ -516,11 +530,11 @@ sub verify_and_change_screenname {
if ($newscreen) {
&Apache::lonnet::put('environment',{'screenname' => $newscreen});
&Apache::lonnet::appenv({'environment.screenname' => $newscreen});
- $message=&mt('Set new screenname to ').'"'.$newscreen.'.".';
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Screenname').'','"'.$newscreen.'"'));
} else {
&Apache::lonnet::del('environment',['screenname']);
- &Apache::lonnet::delenv('environment\.screenname');
- $message=&mt('Reset screenname.');
+ &Apache::lonnet::delenv('environment.screenname');
+ $message=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Screenname').''));
}
# Nickname
$message.=' ';
@@ -529,13 +543,14 @@ sub verify_and_change_screenname {
if ($newscreen) {
&Apache::lonnet::put('environment',{'nickname' => $newscreen});
&Apache::lonnet::appenv({'environment.nickname' => $newscreen});
- $message.=&mt('Set new nickname to ').'"'.$newscreen.'".';
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Nickname').'','"'.$newscreen.'"'));
} else {
&Apache::lonnet::del('environment',['nickname']);
- &Apache::lonnet::delenv('environment\.nickname');
- $message.=&mt('Reset nickname.');
+ &Apache::lonnet::delenv('environment.nickname');
+ $message.=&Apache::lonhtmlcommon::confirm_success(&mt('Reset [_1]',''.&mt('Nickname').''));
}
&Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain);
+ $message=&Apache::loncommon::confirmwrapper($message);
$r->print(<print(<
@@ -584,7 +599,11 @@ sub verify_and_change_icons {
&Apache::lonnet::put('environment',{'icons' => $newicons});
&Apache::lonnet::appenv({'environment.icons' => $newicons});
- $r->print(&mt('Set menu mode to [_1].',$newicons));
+ my $message=&Apache::lonhtmlcommon::confirm_success(&mt('Set [_1] to [_2]',''.&mt('Menu Display').'',''.$newicons.''));
+ $message=&Apache::loncommon::confirmwrapper($message);
+ $r->print(<print(<
-