--- loncom/interface/lonconfigsettings.pm 2024/07/06 16:46:51 1.21.4.15
+++ loncom/interface/lonconfigsettings.pm 2017/11/30 15:15:15 1.40
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: lonconfigsettings.pm,v 1.21.4.15 2024/07/06 16:46:51 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.40 2017/11/30 15:15:15 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -35,11 +35,12 @@ use Apache::lonnet;
use Apache::loncommon();
use Apache::lonhtmlcommon();
use Apache::lonlocal;
+use Apache::lonparmset();
use Apache::courseclassifier();
-use LONCAPA qw(:DEFAULT :match);
+use LONCAPA qw(:DEFAULT :match);
sub print_header {
- my ($r,$phase,$context,$jscript,$container,$instcode,$dom) = @_;
+ my ($r,$phase,$context,$jscript,$container,$instcode,$dom,$values) = @_;
my ($pagetitle,$brcrumtitle,$action,$call_category_check,$instcode_check,
$crstype,@actions,@code_order);
if ($phase eq 'display') {
@@ -91,7 +92,7 @@ sub print_header {
var gotcode = 0;
for (var i=0; i
'.$errors.'
'); - } } $r->print('');
my $footer_text = 'Back to configuration display';
@@ -401,26 +406,29 @@ sub display_settings {
if (ref($values) eq 'HASH') {
$instcode = $values->{'internal.coursecode'};
}
- &print_header($r,$phase,$context,$jscript,$container,$instcode,$dom);
+ &print_header($r,$phase,$context,$jscript,$container,$instcode,$dom,$values);
my $divwidth = 900;
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH') && (ref($values) eq 'HASH')) {
if (@actions > 0) {
my $rowsum = 0;
- my (%output,%rowtotal,@items);
+ my (%output,%rowtotal,@items,$got_check_uncheck);
foreach my $item (@{$prefs_order}) {
if (grep(/^\Q$item\E$/,@actions)) {
push(@items,$item);
if ($context eq 'domain') {
my $settings;
- if (ref($values) eq 'HASH') {
+ if (ref($values) eq 'HASH') {
$settings = $values->{$item};
}
- if ($item eq 'usersessions') {
- $r->print(''."\n");
+ if (($item eq 'usersessions') || ($item eq 'ssl')) {
+ unless ($got_check_uncheck) {
+ $r->print(''."\n");
+ $got_check_uncheck = 1;
+ }
} elsif ($item eq 'selfcreation') {
if (ref($values) eq 'HASH') {
$settings = $values->{'usercreation'};
@@ -437,7 +445,7 @@ sub display_settings {
my $inststatus = {
inststatustypes => $usertypes,
inststatusorder => $types,
- inststatusguest => [],
+ inststatusguest => [],
};
if (ref($values->{defaults}) eq 'HASH') {
$settings = {%{$inststatus},%{$values->{'defaults'}}};
@@ -451,7 +459,7 @@ sub display_settings {
$phase,$item,$prefs->{$item},$settings);
} else {
($output{$item},$rowtotal{$item}) =
- &Apache::courseprefs::print_config_box($r,$dom,$confname,$phase,
+ &Apache::courseprefs::print_config_box($r,$dom,$phase,
$item,$prefs->{$item},$values,$allitems,$crstype,$parm_permission);
}
$rowsum += $rowtotal{$item};
@@ -470,6 +478,9 @@ sub display_settings {
}
$r->print('');
}
+ if ($container) {
+ &Apache::lonparmset::endSettingsScreen($r);
+ }
$r->print(&Apache::loncommon::end_page());
return;
}
@@ -528,10 +539,13 @@ sub display_choices {
$thirddiv = 1;
}
}
+ $r->print('
');
}
- $r->print('