--- loncom/interface/domainprefs.pm 2012/10/02 19:21:20 1.173
+++ loncom/interface/domainprefs.pm 2012/10/30 10:39:02 1.174
@@ -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.174 2012/10/30 10:39:02 foxr 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);
}
@@ -1184,20 +1190,22 @@ sub display_color_options {
$images,$bgs,$links,$alt_text,$rowtotal,$logintext) = @_;
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
my $css_class = $itemcount%2?' class="LC_odd_row"':'';
- my $datatable = '
'.
+ my $js = "\n";
+ my $datatable = $js . '
'.
''.$choices->{'font'}.' | ';
if (!$is_custom->{'font'}) {
$datatable .= ''.&mt('Default in use:').' '.$defaults->{'font'}.' | ';
} 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 +1214,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 +1347,16 @@ sub display_color_options {
}
$datatable .= ''.
' | ';
@@ -1367,13 +1378,13 @@ sub display_color_options {
$datatable .= ''.
' |