--- loncom/interface/lonpreferences.pm 2008/01/20 22:38:06 1.112 +++ loncom/interface/lonpreferences.pm 2008/12/12 19:57:58 1.125.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.112 2008/01/20 22:38:06 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.125.2.1 2008/12/12 19:57:58 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -108,9 +108,14 @@ sub wysiwygchanger { } my $switchoff=&mt('Disable WYSIWYG editor'); my $switchon=&mt('Enable WYSIWYG editor'); + my $warning=''; + if ($env{'user.adv'}) { + $warning.="
".&mt("The WYSIWYG editor only supports simple HTML and is in many cases unsuited for advanced authoring. In a number of cases, it may destroy advanced authoring involving LaTeX and script function calls.")."
"; + } $r->print(<'.&mt('Setting WYSIWYG editor to:').' '.&mt($newsetting).'
'); } @@ -167,7 +172,7 @@ sub verify_and_change_languages { my $message=''; if ($newlanguage) { &Apache::lonnet::put('environment',{'languages' => $newlanguage}); - &Apache::lonnet::appenv('environment.languages' => $newlanguage); + &Apache::lonnet::appenv({'environment.languages' => $newlanguage}); $message=&mt('Set new preferred languages to ').'"'.$newlanguage.'".'; } else { &Apache::lonnet::del('environment',['languages']); @@ -189,35 +194,45 @@ sub texenginechanger { my %userenv = &Apache::lonnet::get('environment',['texengine']); my $texengine=$userenv{'texengine'}; - my $pref=&mt('Preferred method to display Math'); my %mathchoices=('' => 'Default', - 'tth' => 'TeX to HTML', + 'tth' => 'tth (TeX to HTML)', #'ttm' => 'TeX to MathML', 'jsMath' => 'jsMath', - 'mimetex' => 'Convert to Images' + 'mimetex' => 'mimetex (Convert to Images)' ); my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine', %mathchoices); my $jsMath_start=&Apache::lontexconvert::jsMath_header(); - my $change=&mt('Change'); - $r->print(< TeX to HTML
-
+
+$lt{'preftxt'}:
+$selectionbox
jsMath
+
+
+
$jsMath_start - + +
++
- Convert to Images
-
-
+
+
+
ENDLSCREEN if ($env{'environment.texengine'} ne 'jsMath') { @@ -252,16 +272,16 @@ sub verify_and_change_texengine { my $newtexengine = $env{'form.texengine'}; $newtexengine=~s/[^\-\w]//g; if ($newtexengine eq 'ttm') { - &Apache::lonnet::appenv('browser.mathml' => 1); + &Apache::lonnet::appenv({'browser.mathml' => 1}); } else { if ($env{'environment.texengine'} eq 'ttm') { - &Apache::lonnet::appenv('browser.mathml' => 0); + &Apache::lonnet::appenv({'browser.mathml' => 0}); } } my $message=''; if ($newtexengine) { &Apache::lonnet::put('environment',{'texengine' => $newtexengine}); - &Apache::lonnet::appenv('environment.texengine' => $newtexengine); + &Apache::lonnet::appenv({'environment.texengine' => $newtexengine}); $message=&mt('Set new preferred math display to ').'"'.$newtexengine.'".'; } else { &Apache::lonnet::del('environment',['texengine']); @@ -400,7 +420,7 @@ sub verify_and_change_rolespref { my $message='