--- loncom/enrollment/Enrollment.pm 2019/05/14 13:39:18 1.53 +++ loncom/enrollment/Enrollment.pm 2021/10/08 18:49:17 1.56 @@ -1,5 +1,5 @@ # Automated Enrollment manager -# $Id: Enrollment.pm,v 1.53 2019/05/14 13:39:18 raeburn Exp $ +# $Id: Enrollment.pm,v 1.56 2021/10/08 18:49:17 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,6 +25,7 @@ # package LONCAPA::Enrollment; +use lib '/home/httpd/lib/perl'; use Apache::loncoursedata; use Apache::lonnet; use Apache::loncommon(); @@ -35,7 +36,6 @@ use HTML::Parser; use LONCAPA::Configuration; use Math::Random; use Time::Local; -use lib '/home/httpd/lib/perl'; use strict; @@ -331,7 +331,7 @@ sub update_LC { } } # Check for institutional section change - if (($$currlist{$uname}[$instidx] ne $instsec) && (!$added)) { + if (($$currlist{$uname}[$instidx] ne $instsec) && (!$added) && ($$currlist{$uname}[$type] eq "auto")) { my $modify_instsec_result = &Apache::lonnet::modify_student_enrollment($dom,$uname,undef,undef,undef,undef,undef,$stuinfo[ $place{groupID} ],$enddate,$startdate,'auto','',$cid,'',$context,$credits,$instsec); if ($modify_instsec_result =~ /^ok/) { @@ -955,9 +955,12 @@ sub create_password { my ($udom) = @_; my %passwdconf = &Apache::lonnet::get_passwdconf($udom); my ($min,$max,@chars); + $min = $Apache::lonnet::passwdmin; if (ref($passwdconf{'chars'}) eq 'ARRAY') { if ($passwdconf{'min'} =~ /^\d+$/) { - $min = $passwdconf{'min'}; + if ($passwdconf{'min'} > $min) { + $min = $passwdconf{'min'}; + } } if ($passwdconf{'max'} =~ /^\d+$/) { $max = $passwdconf{'max'};