[LON-CAPA-cvs] cvs: loncom /interface selfenroll.pm

raeburn raeburn at source.lon-capa.org
Wed Apr 2 12:51:11 EDT 2014


raeburn		Wed Apr  2 16:51:11 2014 EDT

  Modified files:              
    /loncom/interface	selfenroll.pm 
  Log:
  - For selfenrollment requests which are to be stored with status 'pending',
    pass session ID along as arg in call to &store_selfenroll_request().
  - Store with request so enrollqueued.pl script can have access to it.   
  
  
Index: loncom/interface/selfenroll.pm
diff -u loncom/interface/selfenroll.pm:1.28 loncom/interface/selfenroll.pm:1.29
--- loncom/interface/selfenroll.pm:1.28	Mon Mar 31 02:31:05 2014
+++ loncom/interface/selfenroll.pm	Wed Apr  2 16:51:11 2014
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Allow users to self-enroll in a course
 #
-# $Id: selfenroll.pm,v 1.28 2014/03/31 02:31:05 raeburn Exp $
+# $Id: selfenroll.pm,v 1.29 2014/04/02 16:51:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -232,7 +232,7 @@
         &process_self_enroll($r,$cdom,$cnum,$selfenroll_types,$selfenroll_registered,
                              $selfenroll_access_start,$selfenroll_access_end,
                              $selfenroll_section,$now,$selfenroll_approval,
-                             $selfenroll_notifylist,$owner,$crstype,$lonhost);
+                             $selfenroll_notifylist,$owner,$crstype,$lonhost,$handle);
     } elsif ($env{'form.phase'} eq 'login') {
         my $submit_text = &mt('Log in');
         $r->print('<h3>'.&mt('Log-in to LON-CAPA').'</h3>');
@@ -410,7 +410,7 @@
 sub process_self_enroll {
     my ($r,$cdom,$cnum,$selfenroll_types,$selfenroll_registered,
         $selfenroll_access_start,$selfenroll_access_end,$selfenroll_section,
-        $now,$selfenroll_approval,$selfenroll_notifylist,$owner,$crstype,$lonhost) = @_;
+        $now,$selfenroll_approval,$selfenroll_notifylist,$owner,$crstype,$lonhost,$handle) = @_;
     my $udom = $env{'user.domain'};
     my $uname = $env{'user.name'};
     my $selfenroll = 0;
@@ -455,7 +455,7 @@
             my $outcome = 
                 &store_selfenroll_request($udom,$uname,$usec,$cdom,$cnum,
                                           $selfenroll_notifylist,$owner,
-                                          $selfenroll_approval,$crstype,$lonhost);
+                                          $selfenroll_approval,$crstype,$lonhost,$handle);
             $r->print($outcome);
         } else {
             my $enrollresult = 
@@ -534,7 +534,7 @@
 
 sub store_selfenroll_request {
     my ($udom,$uname,$usec,$cdom,$cnum,$selfenroll_notifylist,$owner,
-        $selfenroll_approval,$crstype,$lonhost) = @_;
+        $selfenroll_approval,$crstype,$lonhost,$handle) = @_;
     my $namespace = 'selfenrollrequests';
     my $output;
     my $now = time;
@@ -564,6 +564,8 @@
             if ($status eq 'pending') {
                 $token = &Apache::lonnet::tmpput(\%selfenroll,$lonhost);;
                 $userenroll{$cdom.'_'.$cnum}{'token'} = $token;
+                $userenroll{$cdom.'_'.$cnum}{'lonhost'} = $lonhost;
+                $userenroll{$cdom.'_'.$cnum}{'handle'} = $handle; 
             } 
             my $warning;
             my $userresult = &Apache::lonnet::put($namespace,\%userenroll,$udom,$uname);




More information about the LON-CAPA-cvs mailing list