Diff for /loncom/interface/createaccount.pm between versions 1.40.2.5.2.15 and 1.40.2.5.2.17

version 1.40.2.5.2.15, 2012/05/01 13:58:27 version 1.40.2.5.2.17, 2012/05/01 16:09:26
Line 415  sub print_username_form { Line 415  sub print_username_form {
         type   => 'Type in your log-in ID and password to find out.',          type   => 'Type in your log-in ID and password to find out.',
         plse   => 'Please enter a valid e-mail address below.',          plse   => 'Please enter a valid e-mail address below.',
         inst   => 'Instructions on how to activate your account will be sent to the e-mail address you provide.',          inst   => 'Instructions on how to activate your account will be sent to the e-mail address you provide.',
         aftr   => 'After completing the activation process you will be directed to the course, where you will have access to a "self test" that will help you assess your readiness for the course.  You will also have access to some introductory material and to the course schedule and policies.',          aftr   => 'After completing the activation process you will be directed to the course.',
         yous => 'Your user id for the course is your email address.',          ther   => 'There you will have access to a "self test" that will help you assess your readiness for the course.',
           ywil   => 'You will also have access to introductory material and to the course schedule and policies.',
           yous   => 'Your user id for the course is your email address.',
     );      );
     my $output;      my $output;
     if (ref($cancreate) eq 'ARRAY') {      if (ref($cancreate) eq 'ARRAY') {
Line 437  sub print_username_form { Line 439  sub print_username_form {
                         &mt('You are about to sign-up for the [_1]Mechanics Online[_2] course.','<em>','</em>').'<br />'.                          &mt('You are about to sign-up for the [_1]Mechanics Online[_2] course.','<em>','</em>').'<br />'.
                         $lt{'plse'}.'</p><ul>'.                          $lt{'plse'}.'</p><ul>'.
                         '<li>'.$lt{'inst'}.'</li>'.                          '<li>'.$lt{'inst'}.'</li>'.
                         '<li>'.$lt{'aftr'}.'</li>'.                          '<li>'.$lt{'aftr'}.'<br />'.$lt{'ther'}.'<br />'.
                                  $lt{'ywil'}.'</li>'.
                         '<li>'.$lt{'yous'}.'</li></ul>';                          '<li>'.$lt{'yous'}.'</li></ul>';
             my $captchaform = &create_recaptcha($pubkey);              my $captchaform = &create_recaptcha($pubkey);
             if ($captchaform) {              if ($captchaform) {
Line 694  sub process_mailtoken { Line 697  sub process_mailtoken {
                     }                      }
                     my %form = &start_session($r,$data{'username'},$domain,                       my %form = &start_session($r,$data{'username'},$domain, 
                                               $lonhost,$data{'courseid'},                                                $lonhost,$data{'courseid'},
                                               $token);                                                $token,'new');
                     $nostart = 1;                      $nostart = 1;
                     $noend = 1;                      $noend = 1;
                 } else {                  } else {
Line 721  sub process_mailtoken { Line 724  sub process_mailtoken {
 }  }
   
 sub start_session {  sub start_session {
     my ($r,$username,$domain,$lonhost,$courseid,$token) = @_;      my ($r,$username,$domain,$lonhost,$courseid,$token,$usertype) = @_;
     my %form = (      my %form = (
                 uname => $username,                  uname => $username,
                 udom  => $domain,                  udom  => $domain,
Line 732  sub start_session { Line 735  sub start_session {
         if ($courseid ne '') {          if ($courseid ne '') {
             $form{'courseid'} = $courseid;              $form{'courseid'} = $courseid;
             $firsturl = '/adm/selfenroll?courseid='.$courseid;              $firsturl = '/adm/selfenroll?courseid='.$courseid;
               if ($usertype) {
                   $firsturl .= '&usertype='.$usertype;
               }
         }          }
     }      }
     if ($r->dir_config('lonBalancer') eq 'yes') {      if ($r->dir_config('lonBalancer') eq 'yes') {
Line 1141  sub username_activation { Line 1147  sub username_activation {
         if ($result eq 'ok') {          if ($result eq 'ok') {
             my $delete = &Apache::lonnet::tmpdel($env{'form.authtoken'});              my $delete = &Apache::lonnet::tmpdel($env{'form.authtoken'});
             $output = &mt('A LON-CAPA account has been created for username: [_1] in domain: [_2].',$username,$domain);              $output = &mt('A LON-CAPA account has been created for username: [_1] in domain: [_2].',$username,$domain);
             my %form = &start_session($r,$username,$domain,$lonhost,$courseid);              my %form = &start_session($r,$username,$domain,$lonhost,$courseid,undef,'new');
             my $nostart = 1;              my $nostart = 1;
             return ('ok',$output,$nostart);              return ('ok',$output,$nostart);
         } else {          } else {

Removed from v.1.40.2.5.2.15  
changed lines
  Added in v.1.40.2.5.2.17


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>