--- loncom/interface/lonpreferences.pm 2005/06/14 20:18:26 1.64 +++ loncom/interface/lonpreferences.pm 2005/11/17 16:57:54 1.68 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.64 2005/06/14 20:18:26 albertel Exp $ +# $Id: lonpreferences.pm,v 1.68 2005/11/17 16:57:54 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -110,8 +110,8 @@ sub wysiwygchanger { <form name="server" action="/adm/preferences" method="post"> <input type="hidden" name="action" value="set_wysiwyg" /> <br /> -<input type="radio" name="wysiwyg" value="off" $onselect /> $switchoff<br /> -<input type="radio" name="wysiwyg" value="on" $offselect /> $switchon +<label><input type="radio" name="wysiwyg" value="off" $onselect /> $switchoff</label><br /> +<label><input type="radio" name="wysiwyg" value="on" $offselect /> $switchon</label> ENDLSCREEN $r->print('<br /><input type="submit" value="'.&mt('Change').'" />'); } @@ -196,25 +196,22 @@ sub texenginechanger { ); my $selectionbox=&Apache::loncommon::select_form($texengine,'texengine', %mathchoices); - my $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$'; - my $jsMath_example=&Apache::lontexconvert::jsMath_converted(\$mathexample); - $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$'; - my $tth_example=&Apache::lontexconvert::tth_converted(\$mathexample); - $mathexample='$$\int\left(\frac{a+b}{c^6*d}\right)$$'; - my $mimetex_example=&Apache::lontexconvert::mimetex_converted(\$mathexample); + my $jsMath_start=&Apache::lontexconvert::jsMath_header(); my $change=&mt('Change'); $r->print(<<ENDLSCREEN); +<br /> + <form name="server" action="/adm/preferences" method="post"> <input type="hidden" name="action" value="verify_and_change_texengine" /> <p>$pref: $selectionbox</p> <p><input type="submit" value="$change" /></p> </form> Examples: -<p> TeX to HTML <br /> $tth_example</p> -<script type="text/javascript">function NoFontMessage () { }</script> -<script src="/adm/jsMath/jsMath.js"></script> +<p> TeX to HTML <br /> +<iframe src="/res/adm/pages/math_example.tex?buttons=no&mode=tth" width="400" hieght="200"></iframe> +</p> <p>jsMath <br /> - +$jsMath_start <script type="text/javascript"> if (jsMath.nofonts == 1) { document.writeln @@ -231,9 +228,13 @@ if (jsMath.nofonts == 1) { +'</font></small></div></center>'); } </script> +<iframe src="/res/adm/pages/math_example.tex?buttons=no&mode=jsMath" width="400" hieght="200"></iframe> -$jsMath_example</p> -<p> Convert to Images <br /> $mimetex_example</p> +</p> +<p> Convert to Images <br /> +<br /> +<iframe src="/res/adm/pages/math_example.tex?buttons=no&mode=mimetex" width="400" hieght="200"></iframe> +</p> ENDLSCREEN if ($env{'environment.texengine'} ne 'jsMath') { $r->print('<script type="text/javascript">jsMath.Process()</script>'); @@ -402,7 +403,7 @@ sub verify_and_change_screenname { &Apache::lonnet::delenv('environment\.nickname'); $message.='Reset nickname'; } - + &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain); $r->print(<<ENDVCSCREEN); $message ENDVCSCREEN @@ -980,12 +981,11 @@ sub coursedisplaychanger { my $r = shift; my $user = $env{'user.name'}; my $domain = $env{'user.domain'}; - my %userenv = &Apache::lonnet::get - ('environment',['course_init_display']); + my %userenv = &Apache::lonnet::get('environment',['course_init_display']); my $firstselect='checked="checked"'; my $whatsnewselect=''; - if ($userenv{'course_init_display'} eq 'firstres') { + if ($userenv{'course_init_display'} ne 'firstres') { $firstselect=''; $whatsnewselect='checked="checked"'; } @@ -996,8 +996,8 @@ sub coursedisplaychanger { $r->print(<<ENDLSCREEN); <form name="server" action="/adm/preferences" method="post"> <input type="hidden" name="action" value="verify_and_change_coursepage" /> -<input type="radio" name="newdisp" value="firstres" $firstselect /> $whatsnew_off<br /> -<input type="radio" name="newdisp" value="whatsnew" $whatsnewselect /> $whatsnew_on +<label><input type="radio" name="newdisp" value="firstres" $firstselect /> $whatsnew_off</label><br /> +<label><input type="radio" name="newdisp" value="whatsnew" $whatsnewselect /> $whatsnew_on</label> ENDLSCREEN $r->print('<br /><input type="submit" value="'.&mt('Change').'" /> </form>');