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

raeburn lon-capa-cvs-allow@mail.lon-capa.org
Thu, 03 Jan 2008 20:42:35 -0000


raeburn		Thu Jan  3 15:42:35 2008 EDT

  Modified files:              
    /loncom	lond 
    /loncom/enrollment	localenroll.pm 
  Log:
  &validate_class_access_handler() - pass the comma-separated owner list to localenroll::check_section() instead of splitting into an array. (For backward compatibility with existing localenroll::check_section() implementations.
  
  - update the documentation for the check_section() stub in enrollment/localenroll.pm to indicate that $owner can be comma-separated list owner and co-owners.
  
  
Index: loncom/lond
diff -u loncom/lond:1.391 loncom/lond:1.392
--- loncom/lond:1.391	Mon Dec 24 23:01:57 2007
+++ loncom/lond	Thu Jan  3 15:42:28 2008
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.391 2007/12/25 04:01:57 raeburn Exp $
+# $Id: lond,v 1.392 2008/01/03 20:42:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.391 $'; #' stupid emacs
+my $VERSION='$Revision: 1.392 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -4455,11 +4455,11 @@
     my ($cmd, $tail, $client) = @_;
     my $userinput = "$cmd:$tail";
     my ($inst_class,$ownerlist,$cdom) = split(/:/, $tail);
-    my @owners = split(/,/,&unescape($ownerlist));
+    my $owners = &unescape($ownerlist);
     my $outcome;
     eval {
 	local($SIG{__DIE__})='DEFAULT';
-	$outcome=&localenroll::check_section($inst_class,\@owners,$cdom);
+	$outcome=&localenroll::check_section($inst_class,$owners,$cdom);
     };
     &Reply($client,\$outcome, $userinput);
 
Index: loncom/enrollment/localenroll.pm
diff -u loncom/enrollment/localenroll.pm:1.27 loncom/enrollment/localenroll.pm:1.28
--- loncom/enrollment/localenroll.pm:1.27	Fri Nov  9 22:10:49 2007
+++ loncom/enrollment/localenroll.pm	Thu Jan  3 15:42:34 2008
@@ -1,6 +1,6 @@
 # functions to glue school database system into Lon-CAPA for 
 # automated enrollment
-# $Id: localenroll.pm,v 1.27 2007/11/10 03:10:49 raeburn Exp $
+# $Id: localenroll.pm,v 1.28 2008/01/03 20:42:34 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -427,13 +427,16 @@
 #
 # 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  
+# (b) $owner - course owner (2.2 and later username:domain; pre-2.2 username;
+                             2.6 and later - comma-separated list of 
+                             username:domain for course owner and co-owners.)
+# (c) $dom - 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  
+# Verifies that at least one of the course owner (or co-owners) have access 
+# to classlist for specific class according to institution's SIS
+# 'ok' if access available  
 ###############################
 
 sub check_section {