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

version 1.113, 2004/12/03 05:15:30 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 339  ENDHEADER Line 340  ENDHEADER
  $r->print("<h1>LON-CAPA Access Control</h1>");   $r->print("<h1>LON-CAPA Access Control</h1>");
         $r->print("<hr><pre>Access  : ".          $r->print("<hr><pre>Access  : ".
                   Apache::lonnet::plaintext($priv)."\n");                    Apache::lonnet::plaintext($priv)."\n");
         $r->print("Resource: $fn\n");          $r->print("Resource: ".&Apache::lonenc::check_encrypt($fn)."\n");
         $r->print("Action  : $msg\n</pre><hr>");          $r->print("Action  : $msg\n</pre><hr>");
     } else {      } else {
         if ($ENV{'user.error.msg'}) {          if ($ENV{'user.error.msg'}) {
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);
Line 605  ENDHEADER Line 606  ENDHEADER
       &mt('Recent Roles')."</td>");        &mt('Recent Roles')."</td>");
     $r->print($output);      $r->print($output);
     $r->print("</tr>");      $r->print("</tr>");
               $doheaders ++;
  }   }
     }      }
   
Line 848  function verifyCoursePick(caller) { Line 850  function verifyCoursePick(caller) {
             }              }
         }          }
         else {          else {
             alert("You must use the 'Select Course' link to open a separate pick course window which you can use to select the course you wish to enter");              alert("Please use the 'Select Course' link to open a separate pick course window where you may select the course you wish to enter.");
         }          }
     }      }
     else {      else {

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


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