[LON-CAPA-cvs] cvs: modules /msu localenroll.pm

raeburn raeburn@source.lon-capa.org
Fri, 26 Mar 2010 12:33:18 -0000


raeburn		Fri Mar 26 12:33:18 2010 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  - Eliminate perl error when multiple usernames match a single PID. 
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.49 modules/msu/localenroll.pm:1.50
--- modules/msu/localenroll.pm:1.49	Thu Mar 25 04:15:58 2010
+++ modules/msu/localenroll.pm	Fri Mar 26 12:33:18 2010
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.49 2010/03/25 04:15:58 raeburn Exp $
+# $Id: localenroll.pm,v 1.50 2010/03/26 12:33:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -860,7 +860,9 @@
                             push(@{$instids->{$pid}},$uname);
                         }
                     } elsif ($instids->{$pid} ne $uname) {
-                        @{$instids->{$pid}} = ($instids->{$pid},$uname);
+                        my $currname = $instids->{$pid};
+                        delete($instids->{$pid});
+                        $instids->{$pid} = [$currname,$uname];
                     }
                 } else {
                     $instids->{$pid} = $uname;