Diff for /loncom/auth/migrateuser.pm between versions 1.45 and 1.47

version 1.45, 2019/06/16 22:27:06 version 1.47, 2020/05/24 11:25:29
Line 671  sub handler { Line 671  sub handler {
         }          }
     }      }
   
     my %form;      my (%form,$cid);
     if ($data{'symb'} ne '') {      if ($data{'symb'} ne '') {
         $form{'symb'} = $data{'symb'};          $form{'symb'} = $data{'symb'};
     }      }
Line 681  sub handler { Line 681  sub handler {
     if ($data{'noloadbalance'} ne '') {      if ($data{'noloadbalance'} ne '') {
         $form{'noloadbalance'} = $data{'noloadbalance'};          $form{'noloadbalance'} = $data{'noloadbalance'};
     }      }
       if ($data{'role'}) {
     if (!$data{'role'}) {          if ($data{'role'} =~ m{\./($match_domain)/($match_courseid)(?:/\w+|$)}) {
               unless (&Apache::lonnet::homeserver($2,$1) eq 'no_host') {
                   $cid = $1.'_'.$2;
               }
           }
       } else {
  my $handle = &Apache::lonnet::check_for_valid_session($r);   my $handle = &Apache::lonnet::check_for_valid_session($r);
  if ($handle) {   if ($handle) {
     &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'),      &Apache::lonnet::transfer_profile_to_env($r->dir_config('lonIDsDir'),
Line 822  sub handler { Line 827  sub handler {
     }      }
  } else {   } else {
             my $desturl = '/adm/roles';              my $desturl = '/adm/roles';
             if ($data{'origurl'} ne '') {              if ($data{'lti.login'}) { 
                 $desturl = $data{'origurl'};                  if ($data{'lti.selfenrollrole'}) {
                 if ($data{'lti.login'}) {                      $desturl .= '?selectrole=1&'.
                     $desturl = $data{'origurl'};                                  &escape($data{'lti.selfenrollrole'}).'=1';
                       if ($data{'origurl'} ne '') {
                           $desturl .= '&orgurl='.$data{'origurl'};
                           if ($data{'origurl'} =~ m{/default_\d+\.sequence$}) {
                               $desturl .= '&navmap=1';
                           }  
                       }
                   } elsif ($data{'origurl'} ne '') {
                       $desturl = $data{'origurl'}; 
                     if ($desturl =~ m{/default_\d+\.sequence$}) {                      if ($desturl =~ m{/default_\d+\.sequence$}) {
                         $desturl .= (($desturl =~/\?/)?'&':'?').'navmap=1';                          $desturl .= (($desturl =~/\?/)?'&':'?').'navmap=1';
                     }                      }
                 }                  }
               } elsif ($data{'origurl'} ne '') {
                   $desturl = $data{'origurl'};
                 if ($data{'linkprot'}) {                  if ($data{'linkprot'}) {
                     my ($linkprotector,$linkuri) = split(/:/,$data{'linkprot'},2);                      my ($linkprotector,$linkuri) = split(/:/,$data{'linkprot'},2);
                     if ($linkprotector) {                      if ($linkprotector) {
Line 915  sub handler { Line 930  sub handler {
         $r->internal_redirect($next_url);          $r->internal_redirect($next_url);
     } else {      } else {
         &Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home,          &Apache::lonauth::success($r,$data{'username'},$data{'domain'},$home,
                                   $next_url,$extra_env,\%form);                                    $next_url,$extra_env,\%form,'',$cid);
     }      }
     return OK;      return OK;
 }  }

Removed from v.1.45  
changed lines
  Added in v.1.47


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