--- loncom/interface/lonpreferences.pm 2005/12/20 15:52:27 1.71 +++ loncom/interface/lonpreferences.pm 2006/05/08 22:25:17 1.86 @@ -1,7 +1,7 @@ # The LearningOnline Network # Preferences # -# $Id: lonpreferences.pm,v 1.71 2005/12/20 15:52:27 raeburn Exp $ +# $Id: lonpreferences.pm,v 1.86 2006/05/08 22:25:17 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 @@ -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): @@ -430,7 +431,7 @@ sub msgforwardchanger { $r->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(< +