--- loncom/interface/domainprefs.pm 2020/02/05 23:46:01 1.369
+++ loncom/interface/domainprefs.pm 2020/02/07 20:42:50 1.370
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Handler to set domain-wide configuration settings
#
-# $Id: domainprefs.pm,v 1.369 2020/02/05 23:46:01 raeburn Exp $
+# $Id: domainprefs.pm,v 1.370 2020/02/07 20:42:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -9378,8 +9378,8 @@ function warnIntPass(field) {
alert('$intalert{passnum}');
}
}
+ field.value = '';
}
- field.value = '';
}
}
}
@@ -14763,6 +14763,8 @@ sub modify_passwords {
if ($staticdefaults{$rule} ne $newvalues{$rule}) {
$changes{'rules'} = 1;
}
+ } else {
+ $changes{'rules'} = 1;
}
} elsif (exists($current{$rule})) {
$changes{'rules'} = 1;
@@ -14972,6 +14974,24 @@ sub modify_passwords {
$resulttext .= '
'.&mt('[_1] set to [_2]',$titles{$rule},$confighash{'passwords'}{$rule}).'';
}
}
+ if (ref($confighash{'passwords'}{'chars'}) eq 'ARRAY') {
+ if (@{$confighash{'passwords'}{'chars'}} > 0) {
+ my %rulenames = &Apache::lonlocal::texthash(
+ uc => 'At least one upper case letter',
+ lc => 'At least one lower case letter',
+ num => 'At least one number',
+ spec => 'At least one non-alphanumeric',
+ );
+ my $needed = '- '.
+ join('
- ',map {$rulenames{$_} } @{$confighash{'passwords'}{'chars'}}).
+ '
';
+ $resulttext .= ''.&mt('[_1] set to: [_2]',$titles{'chars'},$needed).'';
+ } else {
+ $resulttext .= ''.&mt('[_1] set to none',$titles{'chars'}).'';
+ }
+ } else {
+ $resulttext .= ''.&mt('[_1] set to none',$titles{'chars'}).'';
+ }
} elsif ($key eq 'crsownerchg') {
if (ref($confighash{'passwords'}{'crsownerchg'}) eq 'HASH') {
if ((@{$confighash{'passwords'}{'crsownerchg'}{'by'}} == 0) ||