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

raeburn lon-capa-cvs@mail.lon-capa.org
Tue, 29 Aug 2006 05:58:08 -0000


raeburn		Tue Aug 29 01:58:08 2006 EDT

  Modified files:              
    /loncom/enrollment	localenroll.pm 
  Log:
  &check_section used to validate that a course owner has rights to access classlist data for a specific institutional class ID (including section).  Used to verify individual sections of the requested class, or crosslisted classes (and sections). 
  
  
Index: loncom/enrollment/localenroll.pm
diff -u loncom/enrollment/localenroll.pm:1.15 loncom/enrollment/localenroll.pm:1.16
--- loncom/enrollment/localenroll.pm:1.15	Mon Jul 10 22:28:27 2006
+++ loncom/enrollment/localenroll.pm	Tue Aug 29 01:58:06 2006
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for 
 # automated enrollment
-# $Id: localenroll.pm,v 1.15 2006/07/11 02:28:27 raeburn Exp $
+# $Id: localenroll.pm,v 1.16 2006/08/29 05:58:06 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -418,6 +418,26 @@
 }
 
 ###############################
+# sub check_section
+#
+# Incoming data: three arguments (+ fourth optional argument)
+# (a) $class - institutional class id (coursecode concatanated with section) 
+# (b) $owner - course owner (2.2 and later username:domain; pre-2.2 username)
+# (c) $dom 0 domain of course
+# (d) $dbh - optional database handle  
+#
+# returns 1 parameter - $sectioncheck ('ok' or other value). 
+# Verifies that course owner has access to classlist for specific class
+# according to institution's SIS. 'ok' if access available  
+###############################
+
+sub check_section {
+    my ($class,$owner,$dom,$dbh) = @_;
+    my $sectioncheck = 'ok';
+    return $sectioncheck;
+}
+
+###############################
 # sub AUTOLOAD
 #
 # Incoming data: none