--- loncom/interface/loncommon.pm 2009/05/15 14:48:42 1.816 +++ loncom/interface/loncommon.pm 2009/05/15 18:06:13 1.817 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.816 2009/05/15 14:48:42 bisitz Exp $ +# $Id: loncommon.pm,v 1.817 2009/05/15 18:06:13 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -4144,35 +4144,24 @@ Returns: value of designparamter $which ############################################## sub designparm { my ($which,$domain)=@_; - if ($env{'browser.blackwhite'} eq 'on') { - if ($which=~/\.(font|alink|vlink|link|textcol)$/) { - return '#000000'; - } - if ($which=~/\.(pgbg|sidebg|bgcol)$/) { - return '#FFFFFF'; - } - if ($which=~/\.tabbg$/) { - return '#CCCCCC'; - } - } if (exists($env{'environment.color.'.$which})) { - return $env{'environment.color.'.$which}; + return $env{'environment.color.'.$which}; } $domain=&determinedomain($domain); my %domdesign = &get_domainconf($domain); my $output; if ($domdesign{$domain.'.'.$which} ne '') { - $output = $domdesign{$domain.'.'.$which}; + $output = $domdesign{$domain.'.'.$which}; } else { $output = $defaultdesign{$which}; } if (($which =~ /^(student|coordinator|author|admin)\.img$/) || ($which =~ /login\.(img|logo|domlogo|login)/)) { if ($output =~ m{^/(adm|res)/}) { - if ($output =~ m{^/res/}) { - my $local_name = &Apache::lonnet::filelocation('',$output); - &Apache::lonnet::repcopy($local_name); - } + if ($output =~ m{^/res/}) { + my $local_name = &Apache::lonnet::filelocation('',$output); + &Apache::lonnet::repcopy($local_name); + } $output = &lonhttpdurl($output); } } @@ -4444,15 +4433,6 @@ sub make_attr_string { $attr_ref->{'style'}=$style.'; font-size: x-large;'; } - if ($env{'browser.blackwhite'} eq 'on') { - delete($attr_ref->{'font'}); - delete($attr_ref->{'link'}); - delete($attr_ref->{'alink'}); - delete($attr_ref->{'vlink'}); - delete($attr_ref->{'bgcolor'}); - delete($attr_ref->{'background'}); - } - my $attr_string; foreach my $attr (keys(%$attr_ref)) { $attr_string .= " $attr=\"".$attr_ref->{$attr}.'" '; @@ -10226,7 +10206,7 @@ sub escape_url { return join('/',@urlslices).'/'.$lastitem; } -# -------------------------------------------------------- Initliaze user login +# -------------------------------------------------------- Initialize user login sub init_user_environment { my ($r, $username, $domain, $authhost, $form, $args) = @_; my $lonids=$Apache::lonnet::perlvar{'lonIDsDir'}; @@ -10280,19 +10260,6 @@ sub init_user_environment { my ($httpbrowser,$clientbrowser,$clientversion,$clientmathml, $clientunicode,$clientos) = &decode_user_agent($r); -# -------------------------------------- Any accessibility options to remember? - if (($form->{'interface'}) && ($form->{'remember'} eq 'true')) { - foreach my $option ('imagesuppress','appletsuppress', - 'embedsuppress','fontenhance','blackwhite') { - if ($form->{$option} eq 'true') { - &Apache::lonnet::put('environment',{$option => 'on'}, - $domain,$username); - } else { - &Apache::lonnet::del('environment',[$option], - $domain,$username); - } - } - } # ------------------------------------------------------------- Get environment my %userenv = &Apache::lonnet::dump('environment',$domain,$username); @@ -10310,10 +10277,8 @@ sub init_user_environment { if ($userenv{'texengine'} eq 'ttm') { $clientmathml=1; } # --------------- Do not trust query string to be put directly into environment - foreach my $option ('imagesuppress','appletsuppress', - 'embedsuppress','fontenhance','blackwhite', - 'interface','localpath','localres') { - $form->{$option}=~s/[\n\r\=]//gs; + foreach my $option ('interface','localpath','localres') { + $form->{$option}=~s/[\n\r\=]//gs; } # --------------------------------------------------------- Write first profile @@ -10347,13 +10312,6 @@ sub init_user_environment { $form->{'interface'}=~s/\W//gs; $initial_env{"browser.interface"} = $form->{'interface'}; $env{'browser.interface'}=$form->{'interface'}; - foreach my $option ('imagesuppress','appletsuppress', - 'embedsuppress','fontenhance','blackwhite') { - if (($form->{$option} eq 'true') || - ($userenv{$option} eq 'on')) { - $initial_env{"browser.$option"} = "on"; - } - } } foreach my $tool ('aboutme','blog','portfolio') {