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

raeburn raeburn@source.lon-capa.org
Wed, 12 May 2010 16:07:47 -0000


raeburn		Wed May 12 16:07:47 2010 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  - Validation of instructor of record in MSU domain needs to be for $ownername
    not $owner (i.e., sparty instead of sparty:msu).
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.51 modules/msu/localenroll.pm:1.52
--- modules/msu/localenroll.pm:1.51	Sat Apr 17 00:26:04 2010
+++ modules/msu/localenroll.pm	Wed May 12 16:07:47 2010
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.51 2010/04/17 00:26:04 raeburn Exp $
+# $Id: localenroll.pm,v 1.52 2010/05/12 16:07:47 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -318,13 +318,13 @@
         if ($owner ne '') {
             my ($ownername,$ownerdom) = split(':',$owner);
             if ($ownerdom eq 'msu') {
-                if ($owner =~ /^\w{2,8}$/) {
+                if ($ownername =~ /^\w{2,8}$/) {
                     $database = 'RO';
                     ($dbh,$dbflag) = &connect_DB($database);
                     if ($dbflag) {
 # Check if instructor is in CLIFMS for this course
                         eval {
-                            my $clifmscount = $dbh->selectrow_array("SELECT count(*) FROM RO_CLIFMS_VIEW WHERE Term_Code='$term' AND Subj_Code='$subj' AND Crse_Code='$crse' AND MSUNetID='$owner' AND (Record_Type='1' OR Record_Type='2' OR Record_Type ='3' OR Record_Type = '9')");
+                            my $clifmscount = $dbh->selectrow_array("SELECT count(*) FROM RO_CLIFMS_VIEW WHERE Term_Code='$term' AND Subj_Code='$subj' AND Crse_Code='$crse' AND MSUNetID='$ownername' AND (Record_Type='1' OR Record_Type='2' OR Record_Type ='3' OR Record_Type = '9')");
                             if ($clifmscount > 0) {
                                 $outcome = 'valid';
                             } else {