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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Mon, 14 May 2007 20:15:29 -0000


raeburn		Mon May 14 16:15:29 2007 EDT

  Modified files:              
    /loncom/enrollment	localenroll.pm 
    /modules/msu	localenroll.pm 
  Log:
  Apparently values being set in the subroutine were not in scope back in the calling block.
  
  
Index: loncom/enrollment/localenroll.pm
diff -u loncom/enrollment/localenroll.pm:1.19 loncom/enrollment/localenroll.pm:1.20
--- loncom/enrollment/localenroll.pm:1.19	Mon May 14 13:35:01 2007
+++ loncom/enrollment/localenroll.pm	Mon May 14 16:15:23 2007
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for 
 # automated enrollment
-# $Id: localenroll.pm,v 1.19 2007/05/14 17:35:01 raeburn Exp $
+# $Id: localenroll.pm,v 1.20 2007/05/14 20:15:23 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -565,6 +565,8 @@
 
 sub inst_usertypes {
     my ($dom,$usertypes,$order) = @_;
+    @{$order} = ();
+    %{$usertypes} = ();
     my $outcome = 'ok';
     return $outcome;
 }
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.24 modules/msu/localenroll.pm:1.25
--- modules/msu/localenroll.pm:1.24	Mon Feb 26 17:12:16 2007
+++ modules/msu/localenroll.pm	Mon May 14 16:15:26 2007
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.24 2007/02/26 22:12:16 raeburn Exp $
+# $Id: localenroll.pm,v 1.25 2007/05/14 20:15:26 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -588,15 +588,15 @@
 sub inst_usertypes {
     my ($dom,$usertypes,$order) = @_;
     my $outcome = 'ok';
-    $usertypes = { 
+    %{$usertypes} = ( 
                   Faculty => 'Faculty/Academic Staff',
                   Staff => 'Support Staff',
                   Student => 'Student',
                   Assistant => 'Assistant',
                   StaffAff => 'Affiliate',
                   StuAff => 'Student Affiliate'
-                 };
-    $order=['Faculty','Staff','Student','Assistant','StaffAff','StuAff'];
+                 );
+    @{$order}=('Faculty','Staff','Student','Assistant','StaffAff','StuAff');
     return $outcome;
 }