Diff for /loncom/auth/lonroles.pm between versions 1.256.2.6.2.1 and 1.256.2.6.2.3

version 1.256.2.6.2.1, 2012/02/08 00:22:15 version 1.256.2.6.2.3, 2012/02/09 01:11:52
Line 514  ENDENTERKEY Line 514  ENDENTERKEY
                         my $msg;                          my $msg;
  my ($furl,$ferr)=   my ($furl,$ferr)=
     &Apache::lonuserstate::readmap($cdom.'/'.$cnum);      &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
                           unless (($ferr) || ($env{'form.switchrole'})) {
                               &Apache::lonnet::put('nohist_crslastlogin',
                                   {$env{'user.name'}.':'.$env{'user.domain'}.
                                   ':'.$csec.':'.$role => $now},$cdom,$cnum);
                           }
  if (($env{'form.orgurl'}) &&    if (($env{'form.orgurl'}) && 
     ($env{'form.orgurl'}!~/^\/adm\/flip/)) {      ($env{'form.orgurl'}!~/^\/adm\/flip/)) {
     my $dest=$env{'form.orgurl'};      my $dest=$env{'form.orgurl'};
Line 873  ENDHEADER Line 878  ENDHEADER
         }          }
         $r->print(&Apache::loncommon::end_page());          $r->print(&Apache::loncommon::end_page());
  return OK;   return OK;
       } elsif ($countactive==1 && $countfuture==0) { # Only one choice
           my $needs_switchserver;
           if ($env{'user.author'}) {
               $needs_switchserver = &check_needs_switchserver($possiblerole);
           }
           if ((!$needs_switchserver) && ($env{'request.role'} eq 'cm')) {
               $r->print('<h3>'.&mt('Please stand by.').'</h3>'.
                   '<input type="hidden" name="'.$possiblerole.'" value="1" />'.
               '<noscript><br /><input type="submit" name="submit" value="'.&mt('Continue').'" /></noscript>');
               $r->print("</form>\n");
               $r->rflush();
               $r->print('<script type="text/javascript">document.forms.rolechoice.submit();</script>');
               $r->print(&Apache::loncommon::end_page());
               return OK;
           }
           if ($needs_switchserver) {
               $r->print("<h2>".&mt('Server Switch Required')."</h2>\n".
                         &mt('Construction Space access is only available from '.
                             'the home server of the corresponding Author.').'<br />'.
                         &mt("Click the 'Switch Server' link to go there.").'<br />');
           }
     }      }
 # ----------------------------------------------------------------------- Table  # ----------------------------------------------------------------------- Table
   

Removed from v.1.256.2.6.2.1  
changed lines
  Added in v.1.256.2.6.2.3


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