--- loncom/interface/lonpreferences.pm 2005/08/16 16:31:09 1.67 +++ loncom/interface/lonpreferences.pm 2006/06/14 18:54:23 1.87 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.67 2005/08/16 16:31:09 albertel Exp $ +# $Id: lonpreferences.pm,v 1.87 2006/06/14 18:54:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,7 @@ package Apache::lonpreferences; use strict; +use LONCAPA; use Apache::Constants qw(:common); use Apache::File; use Crypt::DES; @@ -98,16 +99,16 @@ sub wysiwygchanger { my $r = shift; my %userenv = &Apache::lonnet::get ('environment',['wysiwygeditor']); + my $onselect='checked="checked"'; my $offselect=''; - my $onselect='checked="1"'; - if ($userenv{'wysiwygeditor'}) { + if ($userenv{'wysiwygeditor'} eq 'on') { $onselect=''; - $offselect='checked="1"'; + $offselect='checked="checked"'; } my $switchoff=&mt('Disable WYSIWYG editor'); my $switchon=&mt('Enable WYSIWYG editor'); $r->print(< +


@@ -147,7 +148,7 @@ sub languagechanger { my $selectionbox=&Apache::loncommon::select_form($language,'language', %langchoices); $r->print(< +
$pref: $selectionbox ENDLSCREEN @@ -188,7 +189,7 @@ sub texenginechanger { my $texengine=$userenv{'texengine'}; my $pref=&mt('Preferred method to display Math'); - my %mathchoices=('' => 'No Preference', + my %mathchoices=('' => 'Default', 'tth' => 'TeX to HTML', #'ttm' => 'TeX to MathML', 'jsMath' => 'jsMath', @@ -201,14 +202,14 @@ sub texenginechanger { $r->print(< - +

$pref: $selectionbox

Examples:

TeX to HTML
- +

jsMath
$jsMath_start @@ -228,12 +229,12 @@ if (jsMath.nofonts == 1) { +''); } - +

Convert to Images

- +

ENDLSCREEN if ($env{'environment.texengine'} ne 'jsMath') { @@ -304,10 +305,10 @@ visited and places a table of these at t People with very few roles should leave this feature disabled.

-
+ -
Enable Recent Roles Hotlist: - +

Number of roles in Hotlist:
New screenname (shown if you post anonymously): @@ -403,7 +404,7 @@ sub verify_and_change_screenname { &Apache::lonnet::delenv('environment\.nickname'); $message.='Reset nickname'; } - + &Apache::lonnet::devalidate_cache_new('namescache',$user.':'.$domain); $r->print(<print(< - + New Forwarding Address(es) (user:domain,user:domain,...):
@@ -505,17 +506,7 @@ ENDVCMSG sub colorschanger { my $r = shift; # figure out colors - my $function='student'; - if ($env{'request.role'}=~/^(cc|in|ta|ep)/) { - $function='coordinator'; - } - if ($env{'request.role'}=~/^(su|dc|ad|li)/) { - $function='admin'; - } - if (($env{'request.role'}=~/^(au|ca)/) || - ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) { - $function='author'; - } + my $function=&Apache::loncommon::get_users_function(); my $domain=&Apache::loncommon::determinedomain(); my %colortypes=('pgbg' => 'Page Background', 'tabbg' => 'Header Background', @@ -524,19 +515,23 @@ sub colorschanger { 'link' => 'Un-Visited Link', 'vlink' => 'Visited Link', 'alink' => 'Active Link'); + my $start_data_table = &Apache::loncommon::start_data_table(); my $chtable=''; foreach my $item (sort(keys(%colortypes))) { my $curcol=&Apache::loncommon::designparm($function.'.'.$item,$domain); - $chtable.=''.$colortypes{$item}.'      Select'; + .$item."','parmform.pres','psub'".');">Select'. + &Apache::loncommon::end_data_table_row()."\n"; } + my $end_data_table = &Apache::loncommon::end_data_table(); my $pjump_def = &Apache::lonhtmlcommon::pjump_javascript_definition(); $r->print(< +