--- loncom/lonnet/perl/lonnet.pm 2003/07/05 10:07:11 1.387 +++ loncom/lonnet/perl/lonnet.pm 2003/07/06 10:30:21 1.388 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.387 2003/07/05 10:07:11 www Exp $ +# $Id: lonnet.pm,v 1.388 2003/07/06 10:30:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2801,13 +2801,16 @@ sub modifyuser { } else { %names = @tmp; } - - if (defined($first)) { $names{'firstname'} = $first; } +# +# Make sure to not trash student environment if instructor does not bother +# to supply name and email information +# + if ($first) { $names{'firstname'} = $first; } if (defined($middle)) { $names{'middlename'} = $middle; } - if (defined($last)) { $names{'lastname'} = $last; } + if ($last) { $names{'lastname'} = $last; } if (defined($gene)) { $names{'generation'} = $gene; } - if (defined($email)) { $names{'notification'} = $email; - $names{'critnotification'} = $email; } + if ($email) { $names{'notification'} = $email; + $names{'critnotification'} = $email; } my $reply = &put('environment', \%names, $udom,$uname); if ($reply ne 'ok') { return 'error: '.$reply; }