--- loncom/interface/domainprefs.pm 2012/09/25 19:54:21 1.171
+++ 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.171 2012/09/25 19:54:21 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 .= ''.
'';
foreach my $item (@{$links}) {
- $datatable .= ''."\n".
- &color_pick($phase,$role,$item,$choices->{$item},
- $designs->{'links'}{$item});
+ my $color = $designs->{'link'}{$item} ? $designs->{'link'}{$item} : $defaults->{'links'}{$item};
+ $datatable .= ' | '."\n";
+
if ($designs->{'links'}{$item}) {
- $datatable.=' ';
+ $datatable.=' ';
}
- $datatable .= '
| ';
}
$$rowtotal += $itemcount;
@@ -1714,9 +1722,7 @@ sub print_quotas {
} elsif ($context eq 'requestauthor') {
my $curroption;
if (ref($settings) eq 'HASH') {
- if (ref($settings->{'requestauthor'}) eq 'HASH') {
- $curroption = $settings->{'requestauthor'};
- }
+ $curroption = $settings->{'default'};
}
if (!$curroption) {
$curroption = 'norequest';
@@ -1861,8 +1867,8 @@ sub print_quotas {
$checked = ' checked="checked"';
}
$datatable .= ' ';
}
} else {
@@ -1965,7 +1971,7 @@ sub print_requestmail {
$datatable .= '';
+ $fullname.' ('.$uname.':'.$udom.')';
}
$datatable .= ' ';
} else {
@@ -5934,6 +5940,10 @@ sub modify_quotas {
$cond = $conditions{$inconf{$type}};
}
$resulttext .= ''.&mt('Set to be available to [_1].',$typetitle).' '.$cond.'';
+ } elsif ($context eq 'requestauthor') {
+ $resulttext .= ''.&mt('Set to "[_1]" for "[_2]".',
+ $titles{$inconf{$type}},$typetitle);
+
} else {
$resulttext .= ''.&mt('Set to be available to [_1]',$typetitle).'';
}
|