[LON-CAPA-cvs] cvs: loncom /interface londropadd.pm /lonnet/perl lonnet.pm

matthew lon-capa-cvs@mail.lon-capa.org
Wed, 02 Jul 2003 15:25:46 -0000


matthew		Wed Jul  2 11:25:46 2003 EDT

  Modified files:              
    /loncom/lonnet/perl	lonnet.pm 
    /loncom/interface	londropadd.pm 
  Log:
  Fix bug where users were prevented from removing name fields from the students
  environment.
  
  
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.384 loncom/lonnet/perl/lonnet.pm:1.385
--- loncom/lonnet/perl/lonnet.pm:1.384	Tue Jul  1 16:45:17 2003
+++ loncom/lonnet/perl/lonnet.pm	Wed Jul  2 11:25:46 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.384 2003/07/01 20:45:17 albertel Exp $
+# $Id: lonnet.pm,v 1.385 2003/07/02 15:25:46 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2800,10 +2800,10 @@
     } else {
         %names = @tmp;
     }
-    if ($first)  { $names{'firstname'}  = $first; }
-    if ($middle) { $names{'middlename'} = $middle; }
-    if ($last)   { $names{'lastname'}   = $last; }
-    if ($gene)   { $names{'generation'} = $gene; }
+    if (defined($first))  { $names{'firstname'}  = $first; }
+    if (defined($middle)) { $names{'middlename'} = $middle; }
+    if (defined($last))   { $names{'lastname'}   = $last; }
+    if (defined($gene))   { $names{'generation'} = $gene; }
     my $reply = &put('environment', \%names, $udom,$uname);
     if ($reply ne 'ok') { return 'error: '.$reply; }
     &logthis('Success modifying user '.$udom.', '.$uname.', '.$uid.', '.
Index: loncom/interface/londropadd.pm
diff -u loncom/interface/londropadd.pm:1.69 loncom/interface/londropadd.pm:1.70
--- loncom/interface/londropadd.pm:1.69	Mon Jun 23 10:38:53 2003
+++ loncom/interface/londropadd.pm	Wed Jul  2 11:25:46 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to drop and add students in courses 
 #
-# $Id: londropadd.pm,v 1.69 2003/06/23 14:38:53 matthew Exp $
+# $Id: londropadd.pm,v 1.70 2003/07/02 15:25:46 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -85,7 +85,8 @@
                 # if this is an active role 
                 if (!($start && ($now<$start)) || !($end && ($now>$end))) {
                     my $reply=&Apache::lonnet::modifystudent
-                        ($udom,$unam,'','','','','','','',
+                        # dom  name  id mode pass     f     m     l     g
+                        ($udom,$unam,'',  '',  '',undef,undef,undef,undef,
                          $section,time,undef,undef,$desiredhost);
                     $result .= $reply.':';
                 }