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

raeburn raeburn at source.lon-capa.org
Mon Dec 1 16:35:32 EST 2025


raeburn		Mon Dec  1 21:35:32 2025 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  - Retrieval of employee ID from data feeds at MSU.
    Emp_Id column is absent from RO_Instructor_CS_View table. 
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.98 modules/msu/localenroll.pm:1.99
--- modules/msu/localenroll.pm:1.98	Thu Nov 20 05:51:58 2025
+++ modules/msu/localenroll.pm	Mon Dec  1 21:35:32 2025
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.98 2025/11/20 05:51:58 raeburn Exp $
+# $Id: localenroll.pm,v 1.99 2025/12/01 21:35:32 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1635,7 +1635,7 @@
             my %pidfields = (
                              hr => 'Pid',
                              ro => {
-                                      Faculty => 'Emp_Id,PID',
+                                      Faculty => 'PID',
                                       Student => 'Pid',
                                    },
                              cs => {
@@ -1683,7 +1683,7 @@
                                     while ( my (@info) = $sth->fetchrow_array ) {
                                         last if ($stoponmatch && $matched);
                                         if (($key eq 'ro') && ($affiliation_by_table{$table} eq 'Faculty')) {
-                                            $pid = (($info[0] eq '')? $info[1] : $info[0]); 
+                                            $pid = $info[0]; 
                                         } else {
                                             $pid = $info[0];
                                         }
@@ -1765,7 +1765,7 @@
                     $idfield{'ro'}{'Faculty'} = 'PID';
                     $unamefield{'ro'}{'Faculty'} = 'MSUNetID'; 
                 } elsif ($pid =~ /^1\d{8}$/) {
-                    $idfield{'ro'}{'Faculty'} = 'Emp_Id';
+                    $idfield{'ro'}{'Faculty'} = 'PID';
                     $unamefield{'ro'}{'Faculty'} = 'MSUNetID';
                     $idfield{'ro'}{'Student'} = 'Pid';
                     $unamefield{'ro'}{'Student'} = 'Pilot_Id'; 
@@ -1880,7 +1880,7 @@
                         }
                     } elsif ($key eq 'ro') {
                         if ($table eq 'RO_Instructor_CS_View') {
-                            $statement = "SELECT DISTINCT MSUNetId,Emp_Id,PID,Name,Record_Type,Term_Seq_Id FROM $table";
+                            $statement = "SELECT DISTINCT MSUNetId,PID,Name,Record_Type,Term_Seq_Id FROM $table";
                             if ($condition{$key}{$table_to_key{$table}}) {
                                 $statement .= " WHERE (($condition{$key}{$table_to_key{$table}}) AND (Record_Type = '1' OR Record_Type = 'PI'))";
                             } else {
@@ -1913,13 +1913,8 @@
                                 ($given,$last,$type) = @rest;
                             } elsif ($key eq 'ro') {
                                 if ($table eq 'RO_Instructor_CS_View') {
-                                    if ($rest[0] =~ /^Z\d{8}$/) {
-                                        $pid = $rest[0];
-                                    } elsif ($pid eq $uname) {
-                                        undef($pid);
-                                    }
-                                    $name = $rest[1];
-                                    if ($rest[2] eq '1' || $rest[2] eq 'PI') {
+                                    $name = $rest[0];
+                                    if ($rest[1] eq '1' || $rest[1] eq 'PI') {
                                         $type = 'Faculty';
                                     }
                                 } else {




More information about the LON-CAPA-cvs mailing list