--- loncom/interface/lonconfigsettings.pm 2024/07/03 16:35:11 1.21.4.14
+++ loncom/interface/lonconfigsettings.pm 2018/03/23 01:01:21 1.42
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: lonconfigsettings.pm,v 1.21.4.14 2024/07/03 16:35:11 raeburn Exp $
+# $Id: lonconfigsettings.pm,v 1.42 2018/03/23 01:01:21 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 +410,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 +449,7 @@ sub display_settings {
my $inststatus = {
inststatustypes => $usertypes,
inststatusorder => $types,
- inststatusguest => [],
+ inststatusguest => [],
};
if (ref($values->{defaults}) eq 'HASH') {
$settings = {%{$inststatus},%{$values->{'defaults'}}};
@@ -470,6 +482,9 @@ sub display_settings {
}
$r->print('');
}
+ if ($container) {
+ &Apache::lonparmset::endSettingsScreen($r);
+ }
$r->print(&Apache::loncommon::end_page());
return;
}
@@ -528,10 +543,13 @@ sub display_choices {
$thirddiv = 1;
}
}
+ $r->print('
');
}
- $r->print('