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

raeburn raeburn at source.lon-capa.org
Thu Sep 20 15:12:38 EDT 2012


raeburn		Thu Sep 20 19:12:38 2012 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  - Accommodate case where no MSUNetID(s) previously added to the LONCAPA table
    in the RO database no longer has/have rights to view classlist data for a 
    particular course in RO_ClassList.
  - Add MSUNetID of a co-owner (if available) who still has rights to view the
    classlist.
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.61 modules/msu/localenroll.pm:1.62
--- modules/msu/localenroll.pm:1.61	Sun Aug 19 03:36:04 2012
+++ modules/msu/localenroll.pm	Thu Sep 20 19:12:37 2012
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.61 2012/08/19 03:36:04 raeburn Exp $
+# $Id: localenroll.pm,v 1.62 2012/09/20 19:12:37 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -817,20 +817,11 @@
                         return $sectioncheck;
                     }
                 }
-                $sectioncheck = $dbh->selectrow_array(
-                                     "SELECT count(*) FROM LONCAPA ".
-                                     "WHERE Term_Code = '$1' AND Subj_Code = '$2' ".
-                                     "AND Crse_Code = '$3' AND Sctn_Code = '$4' ".
-                                     "AND MSUNetID = '$person'");
-                if ($sectioncheck == 0) {
-                    my $outcome = &new_course($class,$person,$dom);
-                    if ($outcome eq 'ok') {
-                        $sectioncheck = 'ok';
-                    }
-                } elsif ($sectioncheck > 0) {
+                my $outcome = &new_course($class,$person,$dom);
+                if ($outcome eq 'ok') {
                     $sectioncheck = 'ok';
+                    last;
                 }
-                last if ($sectioncheck eq 'ok');
             }
         }
     }




More information about the LON-CAPA-cvs mailing list