--- loncom/interface/lonpreferences.pm 2005/02/26 05:37:23 1.56
+++ 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.56 2005/02/26 05:37:23 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;
@@ -40,6 +41,7 @@ use DynaLoader; # for Crypt::DES version
use Apache::loncommon();
use Apache::lonhtmlcommon();
use Apache::lonlocal;
+use Apache::lonnet;
#
# Write lonnet::passwd to do the call below.
@@ -97,20 +99,20 @@ 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(<
+
+
Convert to Images
+
+
+
ENDLSCREEN
- if ($ENV{'environment.texengine'} ne 'jsMath') {
+ if ($env{'environment.texengine'} ne 'jsMath') {
$r->print('');
}
}
@@ -240,15 +245,15 @@ ENDLSCREEN
sub verify_and_change_texengine {
my $r = shift;
- my $user = $ENV{'user.name'};
- my $domain = $ENV{'user.domain'};
+ my $user = $env{'user.name'};
+ my $domain = $env{'user.domain'};
# Screenname
- my $newtexengine = $ENV{'form.texengine'};
+ my $newtexengine = $env{'form.texengine'};
$newtexengine=~s/[^\-\w]//g;
if ($newtexengine eq 'ttm') {
&Apache::lonnet::appenv('browser.mathml' => 1);
} else {
- if ($ENV{'environment.texengine'} eq 'ttm') {
+ if ($env{'environment.texengine'} eq 'ttm') {
&Apache::lonnet::appenv('browser.mathml' => 0);
}
}
@@ -265,7 +270,6 @@ sub verify_and_change_texengine {
$r->print(<
$message
ENDVCSCREEN
}
@@ -275,8 +279,8 @@ ENDVCSCREEN
################################################################
sub rolesprefchanger {
my $r = shift;
- my $user = $ENV{'user.name'};
- my $domain = $ENV{'user.domain'};
+ my $user = $env{'user.name'};
+ my $domain = $env{'user.domain'};
my %userenv = &Apache::lonnet::get
('environment',['recentroles','recentrolesn']);
my $hotlist_flag=$userenv{'recentroles'};
@@ -301,10 +305,10 @@ visited and places a table of these at t
People with very few roles should leave this feature disabled.
-