--- loncom/interface/domainprefs.pm 2012/09/25 23:20:42 1.160.6.7
+++ loncom/interface/domainprefs.pm 2012/12/20 02:58:05 1.160.6.10
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.160.6.7 2012/09/25 23:20:42 raeburn Exp $
+# $Id: domainprefs.pm,v 1.160.6.10 2012/12/20 02:58:05 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1163,13 +1163,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'}.' | ';
@@ -1178,13 +1177,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}) {
@@ -1312,12 +1311,12 @@ sub display_color_options {
$datatable .= ''.
' | ';
@@ -1339,14 +1338,15 @@ 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;
return $datatable;
@@ -1686,9 +1686,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';
@@ -1833,8 +1831,8 @@ sub print_quotas {
$checked = ' checked="checked"';
}
$datatable .= ' ';
}
} else {
@@ -5906,6 +5904,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).'';
}
@@ -7045,10 +7047,12 @@ sub process_captcha {
if (ref($current->{'recaptchakeys'}) eq 'HASH') {
$currpub = $current->{'recaptchakeys'}{'public'};
$currpriv = $current->{'recaptchakeys'}{'private'};
- $newsettings->{'recaptchakeys'} = {
- public => '',
- private => '',
- }
+ unless ($newsettings->{'captcha'} eq 'recaptcha') {
+ $newsettings->{'recaptchakeys'} = {
+ public => '',
+ private => '',
+ }
+ }
}
if (($newpub ne $currpub) || ($newpriv ne $currpriv)) {
if ($container eq 'cancreate') {
|