[LON-CAPA-cvs] cvs: loncom / lond

raeburn lon-capa-cvs@mail.lon-capa.org
Thu, 17 Jun 2004 18:48:06 -0000


raeburn		Thu Jun 17 14:48:06 2004 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Domain parameter passed to autoenroll functions in lond, now passed on in calls to
  localenroll.pm to support domain-specific variants in a single localenroll.pm
  file housed on a multi-domain library server. 
  
  
Index: loncom/lond
diff -u loncom/lond:1.196 loncom/lond:1.197
--- loncom/lond:1.196	Thu Jun 17 07:02:25 2004
+++ loncom/lond	Thu Jun 17 14:48:05 2004
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.196 2004/06/17 11:02:25 foxr Exp $
+# $Id: lond,v 1.197 2004/06/17 18:48:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,7 +56,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.196 $'; #' stupid emacs
+my $VERSION='$Revision: 1.197 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid;
 my $currentdomainid;
@@ -3115,53 +3115,54 @@
 			print $client "refused\n";
 		    }
 #------------------------------- is auto-enrollment enabled?
-                } elsif ($userinput =~/^autorun/) {
+                } elsif ($userinput =~/^autorun:/) {
                     if (isClient) {
-                        my $outcome = &localenroll::run();
+                        my ($cmd,$cdom) = split(/:/,$userinput);
+                        my $outcome = &localenroll::run($cdom);
                         print $client "$outcome\n";
                     } else {
                         print $client "0\n";
                     }
 #------------------------------- get official sections (for auto-enrollment).
-                } elsif ($userinput =~/^autogetsections/) {
+                } elsif ($userinput =~/^autogetsections:/) {
                     if (isClient) {
-                        my ($cmd,$coursecode)=split(/:/,$userinput);
-                        my @secs = &localenroll::get_sections($coursecode);
+                        my ($cmd,$coursecode,$cdom)=split(/:/,$userinput);
+                        my @secs = &localenroll::get_sections($coursecode,$cdom);
                         my $seclist = &escape(join(':',@secs));
                         print $client "$seclist\n";
                     } else {
                         print $client "refused\n";
                     }
 #----------------------- validate owner of new course section (for auto-enrollment).
-                } elsif ($userinput =~/^autonewcourse/) {
+                } elsif ($userinput =~/^autonewcourse:/) {
                     if (isClient) {
-                        my ($cmd,$course_id,$owner)=split(/:/,$userinput);
-                        my $outcome = &localenroll::new_course($course_id,$owner);
+                        my ($cmd,$inst_course_id,$owner,$cdom)=split(/:/,$userinput);
+                        my $outcome = &localenroll::new_course($inst_course_id,$owner,$cdom);
                         print $client "$outcome\n";
                     } else {
                         print $client "refused\n";
                     }
 #-------------- validate course section in schedule of classes (for auto-enrollment).
-                } elsif ($userinput =~/^autovalidatecourse/) {
+                } elsif ($userinput =~/^autovalidatecourse:/) {
                     if (isClient) {
-                        my ($cmd,$course_id)=split(/:/,$userinput);
-                        my $outcome=&localenroll::validate_courseID($course_id);
+                        my ($cmd,$inst_course_id,$cdom)=split(/:/,$userinput);
+                        my $outcome=&localenroll::validate_courseID($inst_course_id,$cdom);
                         print $client "$outcome\n";
                     } else {
                         print $client "refused\n";
                     }
 #--------------------------- create password for new user (for auto-enrollment).
-                } elsif ($userinput =~/^autocreatepassword/) {
+                } elsif ($userinput =~/^autocreatepassword:/) {
                     if (isClient) {
-                        my ($cmd,$authparam)=split(/:/,$userinput);
-                        my ($create_passwd,$authchk) = @_;
-                        ($authparam,$create_passwd,$authchk) = &localenroll::create_password($authparam);
+                        my ($cmd,$authparam,$cdom)=split(/:/,$userinput);
+                        my ($create_passwd,$authchk);
+                        ($authparam,$create_passwd,$authchk) = &localenroll::create_password($authparam,$cdom);
                         print $client &escape($authparam.':'.$create_passwd.':'.$authchk)."\n";
                     } else {
                         print $client "refused\n";
                     }
 #---------------------------  read and remove temporary files (for auto-enrollment).
-                } elsif ($userinput =~/^autoretrieve/) {
+                } elsif ($userinput =~/^autoretrieve:/) {
                     if (isClient) {
                         my ($cmd,$filename) = split(/:/,$userinput);
                         my $source = $perlvar{'lonDaemons'}.'/tmp/'.$filename;