--- loncom/enrollment/Autoupdate.pl 2011/10/14 18:14:31 1.21 +++ loncom/enrollment/Autoupdate.pl 2016/01/27 22:23:18 1.23 @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Automated Userinfo update script -# $Id: Autoupdate.pl,v 1.21 2011/10/14 18:14:31 raeburn Exp $ +# $Id: Autoupdate.pl,v 1.23 2016/01/27 22:23:18 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -68,7 +68,14 @@ my (%users,%instusers,%instids); my $dir = $Apache::lonnet::perlvar{lonUsersDir}.'/'.$dom; &descend_tree($dom,$dir,0,\%users,\%courses); - next if (&localenroll::allusers_info($dom,\%instusers,\%instids,\%users) ne 'ok'); + my $resp = &localenroll::allusers_info($dom,\%instusers,\%instids,\%users); + if ($resp ne 'ok') { + print $fh &mt('Problem retrieving institutional data for users in domain: [_1].',$dom)."\n". + &mt('Error: [_1].',$resp)."\n". + "-- \n".&Apache::lonlocal::locallocaltime(time).' '. + &mt('Autoupdate messages end')."\n*******************\n\n"; + next; + } my (%unamechg,%possnames); my @types = ('active','future'); my @roles = ('st'); @@ -191,7 +198,7 @@ sub descend_tree { closedir(DIR); $depth ++; foreach my $item (@contents) { - if ($depth < 4) { + if (($depth < 4) && (length($item) == 1)) { &descend_tree($dom,$dir.'/'.$item,$depth,$alldomusers,$coursesref); } elsif (-e $dir.'/'.$item.'/passwd') { if (ref($coursesref) eq 'HASH') {