[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface domainprefs.pm
raeburn
raeburn at source.lon-capa.org
Mon Jun 15 16:18:37 EDT 2015
raeburn Mon Jun 15 20:18:37 2015 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface domainprefs.pm
Log:
- For 2.11
Backport 1.266.
Index: loncom/interface/domainprefs.pm
diff -u loncom/interface/domainprefs.pm:1.160.6.64 loncom/interface/domainprefs.pm:1.160.6.65
--- loncom/interface/domainprefs.pm:1.160.6.64 Fri May 22 14:12:08 2015
+++ loncom/interface/domainprefs.pm Mon Jun 15 20:18:35 2015
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.160.6.64 2015/05/22 14:12:08 raeburn Exp $
+# $Id: domainprefs.pm,v 1.160.6.65 2015/06/15 20:18:35 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -7395,10 +7395,14 @@
if (@{$confhash{'validation'}{$item}} > 0) {
@{$confhash{'validation'}{$item}} = sort(@{$confhash{'validation'}{$item}});
}
- if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
- if (ref($domconfig{'requestcourses'}{'validation'}{$item}) eq 'ARRAY') {
- @changed = &Apache::loncommon::compare_arrays($confhash{'validation'}{$item},
- $domconfig{'requestcourses'}{'validation'}{$item});
+ if (ref($domconfig{'requestcourses'}) eq 'HASH') {
+ if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
+ if (ref($domconfig{'requestcourses'}{'validation'}{$item}) eq 'ARRAY') {
+ @changed = &Apache::loncommon::compare_arrays($confhash{'validation'}{$item},
+ $domconfig{'requestcourses'}{'validation'}{$item});
+ } else {
+ @changed = @{$confhash{'validation'}{$item}};
+ }
} else {
@changed = @{$confhash{'validation'}{$item}};
}
@@ -7419,9 +7423,15 @@
$env{'form.requestcourses_validation_'.$item} =~ s/[\n\r\f]+/\s/gs;
}
}
- if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
- if ($domconfig{'requestcourses'}{'validation'}{$item} ne $confhash{'validation'}{$item}) {
- $changes{'validation'}{$item} = $confhash{'validation'}{$item};
+ if (ref($domconfig{'requestcourses'}) eq 'HASH') {
+ if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
+ if ($domconfig{'requestcourses'}{'validation'}{$item} ne $confhash{'validation'}{$item}) {
+ $changes{'validation'}{$item} = $confhash{'validation'}{$item};
+ }
+ } else {
+ if ($confhash{'validation'}{$item} ne '') {
+ $changes{'validation'}{$item} = $confhash{'validation'}{$item};
+ }
}
} else {
if ($confhash{'validation'}{$item} ne '') {
@@ -7439,14 +7449,18 @@
}
}
if (ref($confhash{'validation'}) eq 'HASH') {
- if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
- if ($domconfig{'requestcourses'}{'validation'}{'dc'}) {
- unless ($confhash{'validation'}{'dc'} eq $domconfig{'requestcourses'}{'validation'}{'dc'}) {
- if ($confhash{'validation'}{'dc'} eq '') {
- $changes{'validation'}{'dc'} = &mt('None');
- } else {
- $changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
+ if (ref($domconfig{'requestcourses'}) eq 'HASH') {
+ if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
+ if ($domconfig{'requestcourses'}{'validation'}{'dc'}) {
+ unless ($confhash{'validation'}{'dc'} eq $domconfig{'requestcourses'}{'validation'}{'dc'}) {
+ if ($confhash{'validation'}{'dc'} eq '') {
+ $changes{'validation'}{'dc'} = &mt('None');
+ } else {
+ $changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
+ }
}
+ } elsif ($confhash{'validation'}{'dc'} ne '') {
+ $changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
}
} elsif ($confhash{'validation'}{'dc'} ne '') {
$changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
@@ -7454,9 +7468,13 @@
} elsif ($confhash{'validation'}{'dc'} ne '') {
$changes{'validation'}{'dc'} = $confhash{'validation'}{'dc'};
}
- } elsif (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
- if ($domconfig{'requestcourses'}{'validation'}{'dc'}) {
- $changes{'validation'}{'dc'} = &mt('None');
+ } else {
+ if (ref($domconfig{'requestcourses'}) eq 'HASH') {
+ if (ref($domconfig{'requestcourses'}{'validation'}) eq 'HASH') {
+ if ($domconfig{'requestcourses'}{'validation'}{'dc'}) {
+ $changes{'validation'}{'dc'} = &mt('None');
+ }
+ }
}
}
}
More information about the LON-CAPA-cvs
mailing list