Diff for /loncom/auth/lonroles.pm between versions 1.115 and 1.117

version 1.115, 2004/12/17 21:44:19 version 1.117, 2005/03/03 07:32:49
Line 224  ENDENTERKEY Line 224  ENDENTERKEY
    'request.role.domain' => $cdom,     'request.role.domain' => $cdom,
    'request.course.sec'  => $csec);     'request.course.sec'  => $csec);
                     my $tadv=0;                      my $tadv=0;
     if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }  
     &Apache::lonnet::appenv('request.role.adv'    => $tadv);  
   
     my $msg=&mt('Entering course ...');      my $msg=&mt('Entering course ...');
   
     if (($cnum) && ($role ne 'ca')) {      if (($cnum) && ($role ne 'ca')) {
Line 238  ENDENTERKEY Line 235  ENDENTERKEY
     if ( &Apache::lonnet::mod_perl_version() == 2 ) {      if ( &Apache::lonnet::mod_perl_version() == 2 ) {
  &Apache::lonnet::cleanenv();   &Apache::lonnet::cleanenv();
     }      }
       if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }
       &Apache::lonnet::appenv('request.role.adv'=>$tadv);
     $r->internal_redirect($dest);      $r->internal_redirect($dest);
     return OK;      return OK;
  } else {   } else {
Line 250  ENDENTERKEY Line 249  ENDENTERKEY
  &mt('Could not initialize course at this time.').   &mt('Could not initialize course at this time.').
     '</font></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr;      '</font></h1><h3>'.&mt('Please try again.').'</h3>'.$ferr;
     }      }
       if (&Apache::lonnet::allowed('adv') eq 'F') { $tadv=1; }
       &Apache::lonnet::appenv('request.role.adv'=>$tadv);
   
     # Check to see if the user is a CC entering a course       # Check to see if the user is a CC entering a course 
     # for the first time      # for the first time
Line 376  ENDHEADER Line 377  ENDHEADER
        $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};         $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};
         }          }
         $r->print('<form method="post" name="rolechoice" action="'.(($fn)?$fn:$r->uri).'">');          $r->print('<form method="post" name="rolechoice" action="'.(($fn)?$fn:$r->uri).'">');
         $r->print('<input type=hidden name=orgurl value="'.$fn.'">');          $r->print('<input type="hidden" name="orgurl" value="'.$fn.'" />');
         $r->print('<input type=hidden name=selectrole value=1>');          $r->print('<input type="hidden" name="selectrole" value="1" />');
     }      }
     if ($ENV{'user.adv'}) {      if ($ENV{'user.adv'}) {
  $r->print(   $r->print(
       '<br />'.&mt('Show all roles').': <input type="checkbox" name="showall"');        '<br /><label>'.&mt('Show all roles').': <input type="checkbox" name="showall"');
  if ($ENV{'form.showall'}) { $r->print(' checked'); }   if ($ENV{'form.showall'}) { $r->print(' checked="checked" '); }
  $r->print('><input type=submit value="'.&mt('Display').'">');   $r->print(' /></label><input type="submit" value="'.&mt('Display').'" />');
     }      }
   
     my (%roletext,%sortrole,%roleclass);      my (%roletext,%sortrole,%roleclass);

Removed from v.1.115  
changed lines
  Added in v.1.117


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