Diff for /loncom/auth/lonroles.pm between versions 1.335 and 1.337

version 1.335, 2017/10/27 17:43:47 version 1.337, 2018/04/28 00:57:58
Line 153  sub redirect_user { Line 153  sub redirect_user {
     &Apache::loncommon::no_cache($r);      &Apache::loncommon::no_cache($r);
     $r->send_http_header;      $r->send_http_header;
   
     # Breadcrumbs      my $start_page;
     my $brcrum = [{'href' => $url,      if ($env{'request.lti.login'}) {
                    'text' => 'Switching Role'},];          $start_page = &Apache::loncommon::start_page(undef,undef,
     my $start_page = &Apache::loncommon::start_page('Switching Role',undef,                                                       {'redirect' => [0,$url],}).$msg;
                                                     {'redirect' => [1,$url],      } else {
                                                      'bread_crumbs' => $brcrum,});          # Breadcrumbs
     my $end_page   = &Apache::loncommon::end_page();          my $brcrum = [{'href' => $url,
                          'text' => 'Switching Role'},];
           $start_page = &Apache::loncommon::start_page('Switching Role',undef,
                                                        {'redirect' => [1,$url],
                                                         'bread_crumbs' => $brcrum,}).
                         "\n<p>$msg</p>";
       }
       my $end_page = &Apache::loncommon::end_page();
   
 # Note to style police:   # Note to style police: 
 # This must only replace the spaces, nothing else, or it bombs elsewhere.  # This must only replace the spaces, nothing else, or it bombs elsewhere.
     $url=~s/ /\%20/g;      $url=~s/ /\%20/g;
     $r->print(<<ENDREDIR);      $r->print(<<ENDREDIR);
 $start_page  $start_page
 <p>$msg</p>  
 $end_page  $end_page
 ENDREDIR  ENDREDIR
     return;      return;
Line 738  ENDENTERKEY Line 744  ENDENTERKEY
                                                 $dest .= (($dest =~/\?/)? '&':'?').'symb='.$esc_symb;                                                  $dest .= (($dest =~/\?/)? '&':'?').'symb='.$esc_symb;
                                             }                                              }
                                         }                                          }
                                         &redirect_user($r, &mt('Entering [_1]',                                          my $title;
                                                        $env{'course.'.$cdom.'_'.$cnum.'.description'}),                                          unless ($env{'request.lti.login'}) {
                                                        $dest, $msg);                                              $title = &mt('Entering [_1]',
                                                            $env{'course.'.$cdom.'_'.$cnum.'.description'});
                                           }
                                           &redirect_user($r,$title,$dest,$msg);
                                         return OK;                                          return OK;
                                     }                                      }
     if (&Apache::lonnet::allowed('whn',      if (&Apache::lonnet::allowed('whn',
Line 778  ENDENTERKEY Line 787  ENDENTERKEY
                                 } elsif ($access eq 'B') {                                  } elsif ($access eq 'B') {
                                     $furl = '/adm/navmaps?showOnlyHomework=1';                                      $furl = '/adm/navmaps?showOnlyHomework=1';
                                 }                                  }
                                 $msg = &mt('Entering [_1] ...',                                  my $title;
    $env{'course.'.$cdom.'_'.$cnum.'.description'});                                  if ($env{'request.lti.login'}) {
  &redirect_user($r, &mt('Entering [_1]',                                      undef($msg);
                                $env{'course.'.$cdom.'_'.$cnum.'.description'}),                                  } else {
                                $furl, $msg);                                      $title = &mt('Entering [_1]',
                                                    $env{'course.'.$cdom.'_'.$cnum.'.description'});
                                       $msg = &mt('Entering [_1] ...',
          $env{'course.'.$cdom.'_'.$cnum.'.description'});
                                   }
    &redirect_user($r,$title,$furl,$msg);
     }      }
     return OK;      return OK;
  }   }
Line 1635  sub findcourse_advice { Line 1649  sub findcourse_advice {
  <li>'.&mt('You are in a section of course for which automatic enrollment in the corresponding LON-CAPA course is not active.').'</li>   <li>'.&mt('You are in a section of course for which automatic enrollment in the corresponding LON-CAPA course is not active.').'</li>
  <li>'.&mt('The start date for automated enrollment has yet to be reached.').'</li>   <li>'.&mt('The start date for automated enrollment has yet to be reached.').'</li>
  <li>'.&mt('You registered for the course recently and there is a time lag between the time you register, and the time this information becomes available for the update of LON-CAPA course rosters.').'</li>   <li>'.&mt('You registered for the course recently and there is a time lag between the time you register, and the time this information becomes available for the update of LON-CAPA course rosters.').'</li>
    <li>'.&mt('Automated enrollment added you to the course in the time since you last logged in.').' '.&mt('If that is the case you can use the "Check for changes" link in the gray Functions bar to update the list of your available course roles.').'</li>   
  </ul>');   </ul>');
     } else {      } else {
         $r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'<br />');          $r->print(&mt('If you were expecting to see an active role listed for a particular course, that course may not have been created yet.').'<br />');

Removed from v.1.335  
changed lines
  Added in v.1.337


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