--- loncom/interface/domainprefs.pm 2009/10/09 02:00:21 1.102.2.5
+++ loncom/interface/domainprefs.pm 2009/08/22 18:20:20 1.105
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.102.2.5 2009/10/09 02:00:21 raeburn Exp $
+# $Id: domainprefs.pm,v 1.105 2009/08/22 18:20:20 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -763,6 +763,7 @@ sub print_rolecolors {
my %defaults = (
img => $defaultdesign{$role.'.img'},
font => $defaultdesign{$role.'.font'},
+ fontmenu => $defaultdesign{$role.'.fontmenu'},
);
foreach my $item (@bgs) {
$defaults{'bgs'}{$item} = $defaultdesign{$role.'.'.$item};
@@ -780,6 +781,10 @@ sub print_rolecolors {
$designs{'font'} = $settings->{$role}->{'font'};
$is_custom{'font'} = 1;
}
+ if ($settings->{$role}->{'fontmenu'} ne '') {
+ $designs{'fontmenu'} = $settings->{$role}->{'fontmenu'};
+ $is_custom{'fontmenu'} = 1;
+ }
foreach my $item (@bgs) {
if ($settings->{$role}->{$item} ne '') {
$designs{'bgs'}{$item} = $settings->{$role}->{$item};
@@ -798,6 +803,10 @@ sub print_rolecolors {
$designs{img} = $designhash{$dom.'.'.$role.'.img'};
$is_custom{'img'} = 1;
}
+ if ($designhash{$dom.'.'.$role.'.fontmenu'} ne '') {
+ $designs{fontmenu} = $designhash{$dom.'.'.$role.'.fontmenu'};
+ $is_custom{'fontmenu'} = 1;
+ }
if ($designhash{$dom.'.'.$role.'.font'} ne '') {
$designs{font} = $designhash{$dom.'.'.$role.'.font'};
$is_custom{'font'} = 1;
@@ -826,7 +835,7 @@ sub display_color_options {
my ($dom,$confname,$phase,$role,$itemcount,$choices,$is_custom,$defaults,$designs,
$images,$bgs,$links,$alt_text,$rowtotal,$logintext,$loginheader) = @_;
my $css_class = $itemcount%2?' class="LC_odd_row"':'';
- my $datatable = '
'.
+ my $datatable = '
'.
''.$choices->{'font'}.' | ';
if (!$is_custom->{'font'}) {
$datatable .= ''.&mt('Default in use:').' '.$defaults->{'font'}.' | ';
@@ -840,6 +849,20 @@ sub display_color_options {
' '.
'
';
+ $datatable .= ''.
+ ''.$choices->{'fontmenu'}.' | ';
+ if (!$is_custom->{'fontmenu'}) {
+ $datatable .= ''.&mt('Default in use:').' '.$defaults->{'fontmenu'}.' | ';
+ } else {
+ $datatable .= ' | ';
+ }
+ $fontlink = &color_pick($phase,$role,'fontmenu',$choices->{'fontmenu'},$designs->{'fontmenu'});
+ $datatable .= ''.
+ ' '.$fontlink.
+ ' '.
+ ' |
';
my $switchserver = &check_switchserver($dom,$confname);
foreach my $img (@{$images}) {
$itemcount ++;
@@ -1201,10 +1224,10 @@ sub print_quotas {
$item.'_limit_'.$type.'" size="1" '.
'value="'.$currlimit.'" />';
}
+ $cell{$item} .= ' ';
if ($option eq 'autolimit') {
- $cell{$item} .= $titles{'unlimited'};
+ $cell{$item} .= $titles{'unlimited'}
}
- $cell{$item} .= ' ';
}
} else {
my $checked = 'checked="checked" ';
@@ -1226,7 +1249,7 @@ sub print_quotas {
if ($context eq 'requestcourses') {
$datatable .= '';
foreach my $item (@usertools) {
- $datatable .= ''.$cell{$item}.' | ';
+ $datatable .= ''.$cell{$item}.' | ';
}
$datatable .= '
';
}
@@ -1309,7 +1332,7 @@ sub print_quotas {
}
$defcell{$item} .= ' ';
if ($option eq 'autolimit') {
- $defcell{$item} .= $titles{'unlimited'};
+ $defcell{$item} .= $titles{'unlimited'}
}
}
} else {
@@ -1332,7 +1355,7 @@ sub print_quotas {
if ($context eq 'requestcourses') {
$datatable .= '';
foreach my $item (@usertools) {
- $datatable .= ''.$defcell{$item}.' | ';
+ $datatable .= ''.$defcell{$item}.' | ';
}
$datatable .= '
';
}
@@ -1348,15 +1371,16 @@ sub print_quotas {
$datatable .= ''.
''.&mt('LON-CAPA Advanced Users').' ';
if ($context eq 'requestcourses') {
- $datatable .= &mt('(overrides affiliation, if set)').
- ' | '.
- ''.
- '';
+ $datatable .= &mt('(overrides affiliation, if set)');
+ } else {
+ $datatable .= &mt('(overrides affiliation, if checked)');
+ }
+ $datatable .= ''.
+ '';
+ if ($context eq 'requestcourses') {
+ $datatable .= '';
} else {
- $datatable .= &mt('(overrides affiliation, if checked)').
- ''.
- ''.
- ' ';
+ $datatable .= ' ';
}
my %advcell;
foreach my $item (@usertools) {
@@ -1412,7 +1436,7 @@ sub print_quotas {
}
$advcell{$item} .= ' ';
if ($option eq 'autolimit') {
- $advcell{$item} .= $titles{'unlimited'};
+ $advcell{$item} .= $titles{'unlimited'}
}
}
} else {
@@ -1435,7 +1459,7 @@ sub print_quotas {
if ($context eq 'requestcourses') {
$datatable .= ' | ';
foreach my $item (@usertools) {
- $datatable .= ''.$advcell{$item}.' | ';
+ $datatable .= ''.$advcell{$item}.' | ';
}
$datatable .= ' ';
}
@@ -1873,7 +1897,7 @@ sub courserequest_titles {
sub courserequest_conditions {
my %conditions = &Apache::lonlocal::texthash (
- approval => '(Processing of request subject to approval by Domain Coordinator).',
+ approval => '(Processing of request subject to approval by Domain Coordinator).',
validate => '(Processing of request subject to instittutional validation).',
);
return %conditions;
@@ -2633,7 +2657,7 @@ sub print_serverstatuses {
sub serverstatus_pages {
return ('userstatus','lonstatus','loncron','server-status','codeversions',
'clusterstatus','metadata_keywords','metadata_harvest',
- 'takeoffline','takeonline','showenv','toggledebug');
+ 'takeoffline','takeonline','showenv');
}
sub coursecategories_javascript {
@@ -2660,7 +2684,6 @@ sub coursecategories_javascript {
}
$output = <<"ENDSCRIPT";
ENDSCRIPT
@@ -3136,6 +3158,7 @@ sub color_font_choices {
links => "Link colors",
images => "Images",
font => "Font color",
+ fontmenu => "Font Menu",
pgbg => "Page",
tabbg => "Header",
sidebg => "Border",
@@ -3202,6 +3225,7 @@ sub modify_colors {
@bgs = ('pgbg','tabbg','sidebg');
}
$confhash->{$role}{'font'} = $env{'form.'.$role.'_font'};
+ $confhash->{$role}{'fontmenu'} = $env{'form.'.$role.'_fontmenu'};
foreach my $item (@bgs,@links,@logintext) {
$confhash->{$role}{$item} = $env{'form.'.$role.'_'.$item};
}
@@ -3315,6 +3339,15 @@ sub modify_colors {
$changes{$role}{'font'} = 1;
}
}
+ if ($domconfig->{$role}{'fontmenu'} ne '') {
+ if ($confhash->{$role}{'fontmenu'} ne $domconfig->{$role}{'fontmenu'}) {
+ $changes{$role}{'fontmenu'} = 1;
+ }
+ } else {
+ if ($confhash->{$role}{'fontmenu'}) {
+ $changes{$role}{'fontmenu'} = 1;
+ }
+ }
foreach my $item (@bgs) {
if ($domconfig->{$role}{$item} ne '') {
if ($confhash->{$role}{$item} ne $domconfig->{$role}{$item}) {
@@ -3810,7 +3843,7 @@ sub modify_quotas {
}
foreach my $item (@usertools) {
foreach my $type (@{$types},'default','_LC_adv') {
- my $unset;
+ my $unset;
if ($context eq 'requestcourses') {
$unset = '0';
if ($type eq '_LC_adv') {
@@ -3939,8 +3972,8 @@ sub modify_quotas {
$env{'user.domain'},
$item,'reload',$context);
if ($context eq 'requestcourses') {
- if ($env{'environment.canrequest.'.$item} ne $newacc) {
- $newenv{'environment.canrequest.'.$item} = $newacc;
+ if ($env{'environment.crsrequest.'.$item} ne $newacc) {
+ $newenv{'environment.crsrequest.'.$item} = $newacc;
}
} else {
if ($env{'environment.availabletools.'.$item} ne $newacc) {
|
|