--- loncom/lonnet/perl/lonnet.pm 2003/07/05 10:07:11 1.387 +++ loncom/lonnet/perl/lonnet.pm 2003/07/11 20:41:41 1.390 @@ -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.390 2003/07/11 20:41:41 matthew 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; } @@ -3201,7 +3204,7 @@ sub clear_EXT_cache_status { sub EXT_cache_status { my ($target_domain,$target_user) = @_; my $cachename = 'cache.EXT.'.$target_user.'.'.$target_domain; - if (exists($ENV{$cachename}) && ($ENV{$cachename}+1800) > time) { + if (exists($ENV{$cachename}) && ($ENV{$cachename}+600) > time) { # We know already the user has no data return 1; } else { @@ -4097,7 +4100,8 @@ BEGIN { %domain_auth_arg_def = (); if ($fh) { while (<$fh>) { - next if /^\#/; + next if (/^(\#|\s*$)/); +# next if /^\#/; chomp; my ($domain, $domain_description, $def_auth, $def_auth_arg) = split(/:/,$_,4);