--- loncom/enrollment/Autoupdate.pl 2009/03/09 05:25:49 1.13 +++ loncom/enrollment/Autoupdate.pl 2010/03/21 20:39:30 1.15 @@ -1,7 +1,7 @@ #!/usr/bin/perl # # Automated Userinfo update script -# $Id: Autoupdate.pl,v 1.13 2009/03/09 05:25:49 raeburn Exp $ +# $Id: Autoupdate.pl,v 1.15 2010/03/21 20:39:30 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,7 +42,7 @@ exit; } my @info = ('inststatus','lockedname','internalname','lastname', - 'firstname','id','permanentemail'); + 'firstname','middlename','generation','id','permanentemail'); # Initialize language handler &Apache::lonlocal::get_language_handle(); # find out which users we need to examine @@ -112,7 +112,7 @@ if ($settings->{'classlists'} == 1) { if ($field eq 'id') { $changes{'id'} = 1; - } elsif ($field eq 'lastname' || $field eq 'firstname' || $field eq 'middlename' || $field eq 'gen') { + } elsif ($field eq 'lastname' || $field eq 'firstname' || $field eq 'middlename' || $field eq 'generation') { $changes{'fullname'} = 1; } } @@ -121,6 +121,10 @@ # Make the change if ($changed) { my %userupdate; + foreach my $item ('lastname','firstname','middlename','generation','id', + 'permanentemail') { + $userupdate{$item} = $userhash{$item}; + } foreach my $field (@fields) { $userupdate{$field} = $instusers{$uname}{$field}; }