--- loncom/interface/lonpreferences.pm 2006/03/15 22:11:04 1.76
+++ loncom/interface/lonpreferences.pm 2006/04/10 18:59:30 1.80
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Preferences
#
-# $Id: lonpreferences.pm,v 1.76 2006/03/15 22:11:04 albertel Exp $
+# $Id: lonpreferences.pm,v 1.80 2006/04/10 18:59:30 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -98,16 +98,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(<
+
-
+
Enable Recent Roles Hotlist:
@@ -362,7 +362,7 @@ sub screennamechanger {
my $screenname=$userenv{'screenname'};
my $nickname=$userenv{'nickname'};
$r->print(<
+
New screenname (shown if you post anonymously):
@@ -430,7 +430,7 @@ sub msgforwardchanger {
$r->print(<
-
+
New Forwarding Address(es) (user:domain,user:domain,...):
@@ -505,17 +505,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',
@@ -550,7 +540,7 @@ sub colorschanger {
pclose();
if (document.parmform.pres_marker.value!='') {
if (document.parmform.pres_type.value!='') {
- eval('document.server.'+
+ eval('document.prefs.'+
document.parmform.pres_marker.value+
'.value=document.parmform.pres_value.value;');
}
@@ -567,7 +557,7 @@ sub colorschanger {
-
+
$chtable
@@ -581,17 +571,7 @@ ENDCOL
sub verify_and_change_colors {
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',
@@ -617,7 +597,7 @@ sub verify_and_change_colors {
}
$r->print(<
+
ENDVCCOL
@@ -698,7 +678,7 @@ $errormessage
ensure that unencrypted passwords will not be sent out by a
crappy browser -->
-
+
@@ -887,7 +867,7 @@ sub discussionchanger {
}
$r->print(<<"END");
-
+
$lt{'sdpf'} $lt{'prca'}
$lt{'whpo'}
$lt{'unwh'}
@@ -992,7 +972,7 @@ sub coursedisplaychanger {
$r->print(' '.&mt('Set the default page to be displayed when you select a course role').' '.&mt('(Currently: [_1])',$pagenames{$currvalue}).' '.&mt('The global user preference you set for your courses can be overridden in an individual course by setting a course specific setting via the "[_1]" page in the course',"What's New").'