--- loncom/interface/domainprefs.pm 2012/10/02 19:21:20 1.173
+++ loncom/interface/domainprefs.pm 2012/12/11 22:55:27 1.176
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.173 2012/10/02 19:21:20 raeburn Exp $
+# $Id: domainprefs.pm,v 1.176 2012/12/11 22:55:27 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -406,12 +406,16 @@ sub handler {
col2 => 'Value'}],
};
}
+
+
+
my @roles = ('student','coordinator','author','admin');
my @actions = &Apache::loncommon::get_env_multiple('form.actions');
&Apache::lonhtmlcommon::add_breadcrumb
({href=>"javascript:changePage(document.$phase,'pickactions')",
text=>"Settings to display/modify"});
my $confname = $dom.'-domainconfig';
+
if ($phase eq 'process') {
&Apache::lonconfigsettings::make_changes($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,\@roles);
} elsif ($phase eq 'display') {
@@ -460,6 +464,7 @@ sub handler {
}
}
}
+
&Apache::lonconfigsettings::display_choices($r,$phase,$context,\@prefs_order,\%prefs);
}
return OK;
@@ -521,6 +526,7 @@ sub print_config_box {
my ($r,$dom,$confname,$phase,$action,$item,$settings) = @_;
my $rowtotal = 0;
my $output;
+
if ($action eq 'coursecategories') {
$output = &coursecategories_javascript($settings);
}
@@ -1191,13 +1197,12 @@ sub display_color_options {
} else {
$datatable .= '
| ';
}
- my $fontlink = &color_pick($phase,$role,'font',$choices->{'font'},$designs->{'font'});
+ my $current_color = $designs->{'font'} ? $designs->{'font'} : $defaults->{'font'};
+
$datatable .= ''.
- ' '.$fontlink.
- ' '.
- ' | ';
+ ' '.
+ ' ';
unless ($role eq 'login') {
$datatable .= ''.
''.$choices->{'fontmenu'}.' | ';
@@ -1206,13 +1211,13 @@ sub display_color_options {
} else {
$datatable .= ' | ';
}
- $fontlink = &color_pick($phase,$role,'fontmenu',$choices->{'fontmenu'},$designs->{'fontmenu'});
+ $current_color = $designs->{'fontmenu'} ?
+ $designs->{'fontmenu'} : $defaults->{'fontmenu'};
$datatable .= ''.
- ' '.$fontlink.
- ' '.
- ' |
';
+ ' '.
+ ' ';
}
my $switchserver = &check_switchserver($dom,$confname);
foreach my $img (@{$images}) {
@@ -1339,13 +1344,16 @@ sub display_color_options {
}
$datatable .= ''.
' | ';
@@ -1367,13 +1375,13 @@ sub display_color_options {
$datatable .= ''.
'';
} else {
|