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

raeburn raeburn at source.lon-capa.org
Tue Mar 30 22:59:08 EDT 2021


raeburn		Wed Mar 31 02:59:08 2021 EDT

  Modified files:              
    /modules/msu	localenroll.pm 
  Log:
  - Course Coordinator can be automatically assigned as a co-owner if listed
    in CLIFMS for a crosslisted course when year, semester and department all
    match those for the institutional course code.
  
  
Index: modules/msu/localenroll.pm
diff -u modules/msu/localenroll.pm:1.70 modules/msu/localenroll.pm:1.71
--- modules/msu/localenroll.pm:1.70	Sun Feb 14 10:58:51 2021
+++ modules/msu/localenroll.pm	Wed Mar 31 02:59:08 2021
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for
 # automated enrollment
-# $Id: localenroll.pm,v 1.70 2021/02/14 10:58:51 raeburn Exp $
+# $Id: localenroll.pm,v 1.71 2021/03/31 02:59:08 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -653,6 +653,19 @@
     return ($outcome,$description,$credits);
 }
 
+sub validate_crosslist_access {
+    my ($dom,$instcode,$inst_xlist,$coowner) = @_;
+    my $outcome = '';
+    if ($instcode =~ m/^([suf]s\d{2}(\w{2,4})\d{3,4}\w?$/) {
+        my $semyrdept = $1;
+        if ($inst_xlist =~ m/^(\Q$semyrdept\E\d{3,4}\w?)\d{3}$/) {
+            my $xlistcode = $1;
+            ($outcome) = &validate_instcode($dom,$xlistcode,$coowner);
+        }
+    }
+    return $outcome;
+}
+
 sub validate_crsreq {
     my ($dom,$owner,$crstype,$inststatuslist,$instcode,$instseclist) = @_;
     my ($outcome,$message);




More information about the LON-CAPA-cvs mailing list