--- loncom/interface/domainprefs.pm 2013/01/09 18:14:04 1.183
+++ loncom/interface/domainprefs.pm 2013/09/07 00:19:00 1.205
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.183 2013/01/09 18:14:04 bisitz Exp $
+# $Id: domainprefs.pm,v 1.205 2013/09/07 00:19:00 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -94,7 +94,8 @@ about default quota sizes for portfolio
institutional affiliation in the domain (e.g., Faculty, Staff, Student etc.),
but is now also used to manage availability of user tools:
i.e., blogs, aboutme page, and portfolios, and the course request tool,
-used by course owners to request creation of a course.
+used by course owners to request creation of a course, and to display/store
+default quota sizes for authoring spaces.
Outputs: 1
@@ -254,11 +255,11 @@ sub handler {
col2 => 'Value'}],
},
'quotas' =>
- { text => 'Blogs, personal web pages, webDAV, portfolios',
+ { text => 'Blogs, personal web pages, webDAV/quotas, portfolios',
help => 'Domain_Configuration_Quotas',
header => [{col1 => 'User affiliation',
col2 => 'Available tools',
- col3 => 'Portfolio quota',}],
+ col3 => 'Quotas, Mb; (Authoring requires role)',}],
},
'autoenroll' =>
{ text => 'Auto-enrollment settings',
@@ -386,7 +387,7 @@ sub handler {
col2 => 'Rules'}],
},
'loadbalancing' =>
- {text => 'Dedicated Load Balancer',
+ {text => 'Dedicated Load Balancer(s)',
help => 'Domain_Configuration_Load_Balancing',
header => [{col1 => 'Balancers',
col2 => 'Default destinations',
@@ -407,8 +408,6 @@ sub handler {
};
}
-
-
my @roles = ('student','coordinator','author','admin');
my @actions = &Apache::loncommon::get_env_multiple('form.actions');
&Apache::lonhtmlcommon::add_breadcrumb
@@ -417,9 +416,14 @@ sub handler {
my $confname = $dom.'-domainconfig';
if ($phase eq 'process') {
- &Apache::lonconfigsettings::make_changes($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,\@roles);
+ if (&Apache::lonconfigsettings::make_changes($r,$dom,$phase,$context,\@prefs_order,
+ \%prefs,\%domconfig,$confname,\@roles) eq 'update') {
+ $r->rflush();
+ &devalidate_remote_domconfs($dom);
+ }
} elsif ($phase eq 'display') {
- my $js = &recaptcha_js();
+ my $js = &recaptcha_js().
+ &credits_js();
if ((keys(%servers) > 1) || (keys(%existing) > 0)) {
my ($othertitle,$usertypes,$types) =
&Apache::loncommon::sorted_inst_types($dom);
@@ -492,28 +496,27 @@ sub handler {
}
}
}
-
&Apache::lonconfigsettings::display_choices($r,$phase,$context,\@prefs_order,\%prefs);
}
return OK;
}
sub process_changes {
- my ($r,$dom,$confname,$action,$roles,$values) = @_;
+ my ($r,$dom,$confname,$action,$roles,$values,$lastactref) = @_;
my %domconfig;
if (ref($values) eq 'HASH') {
%domconfig = %{$values};
}
my $output;
if ($action eq 'login') {
- $output = &modify_login($r,$dom,$confname,%domconfig);
+ $output = &modify_login($r,$dom,$confname,$lastactref,%domconfig);
} elsif ($action eq 'rolecolors') {
$output = &modify_rolecolors($r,$dom,$confname,$roles,
- %domconfig);
+ $lastactref,%domconfig);
} elsif ($action eq 'quotas') {
$output = &modify_quotas($dom,$action,%domconfig);
} elsif ($action eq 'autoenroll') {
- $output = &modify_autoenroll($dom,%domconfig);
+ $output = &modify_autoenroll($dom,$lastactref,%domconfig);
} elsif ($action eq 'autoupdate') {
$output = &modify_autoupdate($dom,%domconfig);
} elsif ($action eq 'autocreate') {
@@ -525,11 +528,11 @@ sub process_changes {
} elsif ($action eq 'usermodification') {
$output = &modify_usermodification($dom,%domconfig);
} elsif ($action eq 'contacts') {
- $output = &modify_contacts($dom,%domconfig);
+ $output = &modify_contacts($dom,$lastactref,%domconfig);
} elsif ($action eq 'defaults') {
- $output = &modify_defaults($dom,$r);
+ $output = &modify_defaults($dom,$r,%domconfig);
} elsif ($action eq 'scantron') {
- $output = &modify_scantron($r,$dom,$confname,%domconfig);
+ $output = &modify_scantron($r,$dom,$confname,$lastactref,%domconfig);
} elsif ($action eq 'coursecategories') {
$output = &modify_coursecategories($dom,%domconfig);
} elsif ($action eq 'serverstatuses') {
@@ -554,7 +557,6 @@ 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);
}
@@ -843,7 +845,7 @@ sub print_login {
'
|