File:  [LON-CAPA] / loncom / auth / lonroles.pm
Revision 1.56: download - view: text, annotated - select for diffs
Mon Apr 7 18:24:05 2003 UTC (21 years, 2 months ago) by www
Branches: MAIN
CVS tags: HEAD
New environment variable $ENV{'request.role.adv'} to check if the *current*
role is advanced.

    1: # The LearningOnline Network with CAPA
    2: # User Roles Screen
    3: #
    4: # $Id: lonroles.pm,v 1.56 2003/04/07 18:24:05 www Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: # (Directory Indexer
   29: # (Login Screen
   30: # YEAR=1999
   31: # 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14 Gerd Kortemeyer)
   32: # 11/23 Gerd Kortemeyer)
   33: # YEAR=2000
   34: # 1/14,03/06,06/01,07/22,07/24,07/25,
   35: # 09/04,09/06,09/28,09/29,09/30,10/2,10/5,10/26,10/28,
   36: # 12/08,12/28,
   37: # YEAR=2001
   38: # 01/15/01 Gerd Kortemeyer
   39: # 03/02,05/03,05/25,05/30,06/01,07/06,08/06 Gerd Kortemeyer
   40: # 12/29 Gerd Kortemeyer
   41: #
   42: ###
   43: 
   44: package Apache::lonroles;
   45: 
   46: use strict;
   47: use Apache::lonnet();
   48: use Apache::lonuserstate();
   49: use Apache::Constants qw(:common);
   50: use Apache::File();
   51: use Apache::lonmenu;
   52: use Apache::loncommon;
   53: 
   54: sub handler {
   55: 
   56:     my $r = shift;
   57: 
   58:     my $now=time;
   59:     my $then=$ENV{'user.login.time'};
   60:     my $envkey;
   61: 
   62: 
   63: # ================================================================== Roles Init
   64: 
   65:     if ($ENV{'form.selectrole'}) {
   66: 	if ($ENV{'request.course.id'}) {
   67: 	    my %temp=('logout_'.$ENV{'request.course.id'} => time);
   68: 	    &Apache::lonnet::put('email_status',\%temp);
   69:         }
   70: 	&Apache::lonnet::appenv("request.course.id"   => '',
   71: 				"request.course.fn"   => '',
   72: 				"request.course.uri"  => '',
   73: 				"request.course.sec"  => '',
   74: 				"request.role"        => 'cm',
   75:                                 "request.role.adv"    => $ENV{'user.adv'},
   76: 				"request.role.domain" => $ENV{'user.domain'});
   77:         foreach $envkey (keys %ENV) {
   78:             next if ($envkey!~/^user\.role\./);
   79: 	    my (undef,undef,$role,@pwhere)=split(/\./,$envkey);
   80:             my $where=join('.',@pwhere);
   81:             my $trolecode=$role.'.'.$where;
   82:             if ($ENV{'form.'.$trolecode}) {
   83: 		my ($tstart,$tend)=split(/\./,$ENV{$envkey});
   84: 		my $tstatus='is';
   85: 		if ($tstart) {
   86: 		    if ($tstart>$then) { 
   87: 			$tstatus='future';
   88: 		    }
   89: 		}
   90: 		if ($tend) {
   91: 		    if ($tend<$then) { $tstatus='expired'; }
   92: 		    if ($tend<$now) { $tstatus='will_not'; }
   93: 		}
   94: 		if ($tstatus eq 'is') {
   95: 		    $where=~s/^\///;
   96: 		    my ($cdom,$cnum,$csec)=split(/\//,$where);
   97: # check for keyed access
   98: 		    if (($role eq 'st') && 
   99:                        ($ENV{'course.'.$cdom.'_'.$cnum.'.keyaccess'} eq 'yes')) {
  100: 		         unless (&Apache::lonnet::validate_access_key(
  101: 				     $ENV{'environment.key.'.$cdom.'_'.$cnum},
  102: 					     $cdom,$cnum)) {
  103: # there is no valid key
  104: 			     if ($ENV{'form.newkey'}) {
  105: # student attempts to register a new key
  106: 			     } else {
  107: # print form to enter a new key
  108: 				 $r->content_type('text/html');
  109: 				 &Apache::loncommon::no_cache($r);
  110: 				 $r->send_http_header;
  111: 				 my $swinfo=&Apache::lonmenu::rawconfig();
  112: 				 my $bodytag=&Apache::loncommon::bodytag
  113: 				    ('Enter Access Key to Unlock this Course');
  114: 				 $r->print(<<ENDENTERKEY);
  115: <head><title>Entering Course Access Key</title>
  116: </head>
  117: <html>
  118: $bodytag
  119: <script>
  120: $swinfo
  121: </script>
  122: <form method="post">
  123: <input type="hidden" name="selectrole" value="$ENV{'form.selectrole'}" />
  124: <input type="text" size="20" name="newkey" value="$ENV{'form.newkey'}" />
  125: <input type="submit" value="Enter key" />
  126: </form>
  127: </body></html>
  128: ENDENTERKEY
  129: 				 return OK;
  130: 			     }
  131: 			 }
  132: 		     }
  133:                     my $tadv=0;
  134:                     if (($trolecode!~/^st/) && 
  135:                         ($trolecode!~/^ta/) && 
  136:                         ($trolecode!~/^cm/)) { $tadv=1; }
  137: 		    &Apache::lonnet::appenv(
  138:                                            'request.role'        => $trolecode,
  139: 					   'request.role.adv'    => $tadv,
  140: 					   'request.role.domain' => $cdom,
  141: 					   'request.course.sec'  => $csec);
  142: 		    my $msg='Entering course ...';
  143: 		    if (($cnum) && ($role ne 'ca')) {
  144: 			my ($furl,$ferr)=
  145: 			    &Apache::lonuserstate::readmap($cdom.'/'.$cnum);
  146: 			if (($ENV{'form.orgurl'}) && 
  147: 			    ($ENV{'form.orgurl'}!~/^\/adm\/flip/)) {
  148: 			    $r->internal_redirect($ENV{'form.orgurl'});
  149: 			    return OK;
  150: 			} else {
  151: 			    unless ($ENV{'request.course.id'}) {
  152: 				&Apache::lonnet::appenv(
  153: 				      "request.course.id"  => $cdom.'_'.$cnum);
  154: 				$furl='/adm/notfound.html';
  155: 				$msg=
  156: 	 '<h1><font color=red>Could not initialize top-level map.</font></h1>';
  157: 			    }
  158: 			    $r->content_type('text/html');
  159: 			    &Apache::loncommon::no_cache($r);
  160: 			    $r->send_http_header;
  161: 			    my $swinfo=&Apache::lonmenu::rawconfig();
  162: 			    my $bodytag=&Apache::loncommon::bodytag('Switching Role');
  163: 			    print (<<ENDREDIR);
  164: <head><title>Entering Course</title>
  165: <meta HTTP-EQUIV="Refresh" CONTENT="1; url=$furl">
  166: </head>
  167: <html>
  168: $bodytag
  169: <script>
  170: $swinfo
  171: </script>
  172: <h1>$msg</h1>
  173: </body>
  174: </html>
  175: ENDREDIR
  176:                             return OK;
  177: 			}
  178: 		    }
  179: 		}
  180:             }
  181:         }
  182:     }
  183: 
  184: 
  185: # =============================================================== No Roles Init
  186: 
  187:     $r->content_type('text/html');
  188:     &Apache::loncommon::no_cache($r);
  189:     $r->send_http_header;
  190:     return OK if $r->header_only;
  191: 
  192:     my $swinfo=&Apache::lonmenu::rawconfig();
  193:     my $bodytag=&Apache::loncommon::bodytag('User Roles');
  194:     my $helptag=&Apache::loncommon::help_open_topic
  195:      ("General_Intro","Click here for help");
  196:     $r->print(<<ENDHEADER);
  197: <html>
  198: <head>
  199: <title>LON-CAPA User Roles</title>
  200: </head>
  201: $bodytag
  202: $helptag<br />
  203: <script>
  204: $swinfo
  205: window.focus();
  206: </script>
  207: ENDHEADER
  208: 
  209: # ------------------------------------------ Get Error Message from Environment
  210: 
  211:     my ($fn,$priv,$nochoose,$error,$msg)=split(/:/,$ENV{'user.error.msg'});
  212:     if ($ENV{'user.error.msg'}) {
  213: 	$r->log_reason(
  214:    "$msg for $ENV{'user.name'} domain $ENV{'user.domain'} access $priv",$fn);
  215:     }
  216: 
  217: # ---------------------------------------------------------------- Who is this?
  218: 
  219:     my $advanced=0;
  220:     foreach $envkey (keys %ENV) {
  221:         if ($envkey=~/^user\.role\./) {
  222: 	    my (undef,undef,$role,@pwhere)=split(/\./,$envkey);
  223:             if ($role ne 'st') { $advanced=1; }
  224:         }
  225:     }
  226: 
  227: # -------------------------------------------------------- Generate Page Output
  228: # --------------------------------------------------------------- Error Header?
  229:     if ($error) {
  230: 	$r->print("<h1>LON-CAPA Access Control</h1>");
  231:         $r->print("<hr><pre>Access  : ".
  232:                   Apache::lonnet::plaintext($priv)."\n");
  233:         $r->print("Resource: $fn\n");
  234:         $r->print("Action  : $msg\n</pre><hr>");
  235:     } else {
  236:         if ($ENV{'user.error.msg'}) {
  237: 	    $r->print(
  238:  '<h3><font color=red>You need to choose another user role or '.
  239:  'enter a specific course for this function</font></h3>');
  240: 	}
  241:     }
  242: # -------------------------------------------------------- Choice or no choice?
  243:     if ($nochoose) {
  244:         if ($advanced) {
  245: 	    $r->print("<h2>Assigned User Roles</h2>\n");
  246:         } else {
  247: 	    $r->print("<h2>Sorry ...</h2>\nThis resource might be part of");
  248: 	    if ($ENV{'request.course.id'}) {
  249: 		$r->print(' another');
  250: 	    } else {
  251: 		$r->print(' a certain');
  252: 	    } 
  253: 	    $r->print(' course.</body></html>');
  254: 	    return OK;
  255:         } 
  256:     } else {
  257:         if ($advanced) {
  258: 	    $r->print("Your home server is ".
  259: 		      $Apache::lonnet::hostname{&Apache::lonnet::homeserver
  260:                       ($ENV{'user.name'},$ENV{'user.domain'})}.
  261: 		      "<br />\n");
  262: 	    $r->print("Author and Co-Author roles may not be available on ".
  263: 		      "servers other than your home server.");
  264:         } else {
  265: 	    $r->print("<h2>Enter a Course</h2>\n");
  266:         }
  267:         if (($ENV{'REDIRECT_QUERY_STRING'}) && ($fn)) {
  268:     	    $fn.='?'.$ENV{'REDIRECT_QUERY_STRING'};
  269:         }
  270:         $r->print('<form method=post action="'.(($fn)?$fn:$r->uri).'">');
  271:         $r->print('<input type=hidden name=orgurl value="'.$fn.'">');
  272:         $r->print('<input type=hidden name=selectrole value=1>');
  273:     }
  274:     $r->print('<br>Show all roles: <input type=checkbox name=showall');
  275:     if ($ENV{'form.showall'}) { $r->print(' checked'); }
  276:     $r->print('><input type=submit value="Display"><br>');
  277: # ----------------------------------------------------------------------- Table
  278:     $r->print('<table><tr>');
  279:     unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }
  280:     $r->print('<th>User Role</th><th colspan=2>Extent</th>'.
  281: 	      '<th>Start</th><th>End</th><th>Remark</th></tr>'."\n");
  282: 
  283:     foreach $envkey (sort keys %ENV) {
  284:         my $button = 1;
  285:         my $switchserver='';
  286:         if ($envkey=~/^user\.role\./) {
  287: 	    my (undef,undef,$role,@pwhere)=split(/\./,$envkey);
  288:             next if (!defined($role) || $role eq '');
  289:             my $where=join('.',@pwhere);
  290:             my $trolecode=$role.'.'.$where;
  291:             my ($tstart,$tend)=split(/\./,$ENV{$envkey});
  292:             my $tremark='';
  293:             my $tstatus='is';
  294:             my $tpstart='&nbsp;';
  295:             my $tpend='&nbsp;';
  296:             my $tfont='#000000';
  297:             if ($tstart) {
  298: 		if ($tstart>$then) { 
  299:                     $tstatus='future';
  300:                     if ($tstart<$now) { $tstatus='will'; }
  301:                 }
  302:                 $tpstart=localtime($tstart);
  303:             }
  304:             if ($tend) {
  305:                 if ($tend<$then) { 
  306:                     $tstatus='expired'; 
  307:                 } elsif ($tend<$now) { 
  308:                     $tstatus='will_not'; 
  309:                 }
  310:                 $tpend=localtime($tend);
  311:             }
  312:             if ($ENV{'request.role'} eq $trolecode) {
  313: 		$tstatus='selected';
  314:             }
  315:             my $tbg;
  316:             if (($tstatus eq 'is') || ($tstatus eq 'selected') ||
  317:                 ($ENV{'form.showall'})) {
  318:                 if ($tstatus eq 'is') {
  319:                     $tbg='#77FF77';
  320:                     $tfont='#003300';
  321:                 } elsif ($tstatus eq 'future') {
  322:                     $tbg='#FFFF77';
  323:                     $button=0;
  324:                 } elsif ($tstatus eq 'will') {
  325:                     $tbg='#FFAA77';
  326:                     $tremark.='Active at next login. ';
  327:                 } elsif ($tstatus eq 'expired') {
  328:                     $tbg='#FF7777';
  329:                     $tfont='#330000';
  330:                     $button=0;
  331:                 } elsif ($tstatus eq 'will_not') {
  332:                     $tbg='#AAFF77';
  333:                     $tremark.='Expired after logout. ';
  334:                 } elsif ($tstatus eq 'selected') {
  335:                     $tbg='#11CC55';
  336:                     $tfont='#002200';
  337:                     $tremark.='Currently selected. ';
  338:                 }
  339:                 my $trole;
  340:                 if ($role =~ /^cr\//) {
  341:                     my ($rdummy,$rdomain,$rauthor,$rrole)=split(/\//,$role);
  342:                     $tremark.='<br>Defined by '.$rauthor.' at '.$rdomain.'.';
  343:                     $trole=$rrole;
  344:                 } else {
  345:                     $trole=Apache::lonnet::plaintext($role);
  346:                 }
  347:                 my $ttype;
  348:                 my $twhere;
  349:                 my ($tdom,$trest,$tsection)=
  350:                     split(/\//,Apache::lonnet::declutter($where));
  351:                 # First, Co-Authorship roles
  352:                 if ($role eq 'ca') {
  353:                     my $home = &Apache::lonnet::homeserver($trest,$tdom);
  354:                     if ($home ne $r->dir_config('lonHostID')) {
  355: 			$button=0;
  356:                         $switchserver=&Apache::lonnet::escape('http://'.
  357:                          $Apache::lonnet::hostname{$home}.
  358:                          '/adm/login?domain='.$ENV{'user.domain'}.
  359: 			  '&username='.$ENV{'user.name'}.
  360:                           '&firsturl=/priv/'.$trest);
  361:                     }
  362:                     #next if ($home eq 'no_host');
  363:                     $home = $Apache::lonnet::hostname{$home};
  364:                     $ttype='Construction Space';
  365:                     $twhere='User: '.$trest.'<br />Domain: '.$tdom.'<br />'.
  366:                         ' Server:&nbsp;'.$home;
  367:                     $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';
  368:                 } elsif ($role eq 'au') {
  369:                     # Authors
  370:                     my $home = &Apache::lonnet::homeserver
  371:                         ($ENV{'user.name'},$ENV{'user.domain'});
  372:                     if ($home ne $r->dir_config('lonHostID')) {
  373: 			$button=0;
  374:                         $switchserver=&Apache::lonnet::escape('http://'.
  375:                          $Apache::lonnet::hostname{$home}.
  376:                           '/adm/login?domain='.$ENV{'user.domain'}.
  377: 			   '&username='.$ENV{'user.name'}.
  378:                            '&firsturl=/priv/'.$ENV{'user.name'});
  379:                     }
  380:                     #next if ($home eq 'no_host');
  381:                     $home = $Apache::lonnet::hostname{$home};
  382:                     $ttype='Construction Space';
  383:                     $twhere='Domain: '.$tdom.'<br />Server:&nbsp;'.$home;
  384:                     $ENV{'course.'.$tdom.'_'.$trest.'.description'}='ca';
  385:                 } elsif ($trest) {
  386:                     $ttype='Course';
  387:                     if ($tsection) {
  388:                         $ttype.='<br>Section/Group: '.$tsection;
  389: 		    }
  390:                     my $tcourseid=$tdom.'_'.$trest;
  391:                     if ($ENV{'course.'.$tcourseid.'.description'}) {
  392:                         $twhere=$ENV{'course.'.$tcourseid.'.description'};
  393:                         unless ($twhere eq 'Currently not available') {
  394: 			    $twhere.=' <font size="-2">'.
  395:         &Apache::loncommon::syllabuswrapper('Syllabus',$trest,$tdom,$tfont).
  396:                                     '</font>';
  397: 			}
  398:                     } else {
  399:                         my %newhash=Apache::lonnet::coursedescription
  400:                             ($tcourseid);
  401:                         if (%newhash) {
  402:                             $twhere=$newhash{'description'}.
  403:                               ' <font size="-2">'.
  404:         &Apache::loncommon::syllabuswrapper('Syllabus',$trest,$tdom,$tfont).
  405:                               '</font>';
  406:                         } else {
  407:                             $twhere='Currently not available';
  408:                             $ENV{'course.'.$tcourseid.'.description'}=$twhere;
  409:                         }
  410:                     }
  411: 		    if ($role ne 'st') { $twhere.="<br />Domain:".$tdom; }
  412:                 } elsif ($tdom) {
  413:                     $ttype='Domain';
  414:                     $twhere=$tdom;
  415:                 } else {
  416:                     $ttype='System';
  417:                     $twhere='system wide';
  418:                 }
  419:  
  420:                 $r->print('<tr bgcolor='.$tbg.'>');
  421:                 unless ($nochoose) {
  422:                     if (!$button) {
  423: 			if ($switchserver) {
  424: 			    $r->print('<td><a href="/adm/logout?handover='.
  425:                               $switchserver.'">Switch Server</a></td>');
  426:                         } else {
  427:                             $r->print('<td>&nbsp;</td>');
  428:                         }
  429:                     } elsif ($tstatus eq 'is') {
  430:                         $r->print('<td><input type=submit value=Select name="'.
  431:                                   $trolecode.'"></td>');
  432:                     } elsif ($ENV{'user.adv'}) {
  433:                         $r->print
  434:                             ('<td><input type=submit value="Re-Initialize"'.
  435:                              ' name="'.$trolecode.'"></td>');
  436:                     } else {
  437:                         $r->print('<td>&nbsp;</td>');
  438:                     }
  439:                 }
  440: 		$r->print('<td><font color="'.$tfont.'">'.$trole.
  441:                       '</font></td><td><font color="'.$tfont.'">'.$ttype.
  442:                       '</font></td><td><font color="'.$tfont.'">'.$twhere.
  443:                       '</font></td><td><font color="'.$tfont.'">'.$tpstart.
  444:                       '</font></td><td><font color="'.$tfont.'">'.$tpend.
  445:                       '</font></td><td><font color="'.$tfont.'">'.$tremark.
  446:                       '&nbsp;</font></td></tr>'."\n");
  447: 	    }
  448:         }
  449:     }
  450:     my $tremark='';
  451:     my $tfont='#003300';
  452:     if ($ENV{'request.role'} eq 'cm') {
  453: 	$r->print('<tr bgcolor="#11CC55">');
  454:         $tremark='Currently selected.';
  455:         $tfont='#002200';
  456:     } else {
  457:         $r->print('<tr bgcolor="#77FF77">');
  458:     }
  459:     unless ($nochoose) {
  460: 	if ($ENV{'request.role'} ne 'cm') {
  461: 	    $r->print('<td><input type=submit value=Select name="cm"></td>');
  462: 	} else {
  463: 	    $r->print('<td>&nbsp;</td>');
  464: 	}
  465:     }
  466:     $r->print('<td colspan=5><font color="'.$tfont.'">No role specified'.
  467:       '</font></td><td><font color="'.$tfont.'">'.$tremark.
  468:       '&nbsp;</font></td></tr>'."\n");
  469: 
  470:     $r->print('</table>');
  471:     unless ($nochoose) {
  472: 	$r->print("</form>\n");
  473:     }
  474: # ------------------------------------------------------------ Privileges Info
  475:     if (($advanced) && (($ENV{'user.error.msg'}) || ($error))) {
  476: 	$r->print('<hr><h2>Current Privileges</h2>');
  477: 
  478: 	foreach $envkey (sort keys %ENV) {
  479: 	    if ($envkey=~/^user\.priv\.$ENV{'request.role'}\./) {
  480: 		my $where=$envkey;
  481: 		$where=~s/^user\.priv\.$ENV{'request.role'}\.//;
  482: 		my $ttype;
  483: 		my $twhere;
  484: 		my ($tdom,$trest,$tsec)=
  485: 		    split(/\//,Apache::lonnet::declutter($where));
  486: 		if ($trest) {
  487: 		    if ($ENV{'course.'.$tdom.'_'.$trest.'.description'} eq 'ca') {
  488: 			$ttype='Construction Space';
  489: 			$twhere='User: '.$trest.', Domain: '.$tdom;
  490: 		    } else {
  491: 			$ttype='Course';
  492: 			$twhere=$ENV{'course.'.$tdom.'_'.$trest.'.description'};
  493: 			if ($tsec) {
  494: 			    $twhere.=' (Section/Group: '.$tsec.')';
  495: 			}
  496: 		    }
  497: 		} elsif ($tdom) {
  498: 		    $ttype='Domain';
  499: 		    $twhere=$tdom;
  500: 		} else {
  501: 		    $ttype='System';
  502: 		    $twhere='/';
  503: 		}
  504: 		$r->print("\n<h3>".$ttype.': '.$twhere.'</h3><ul>');
  505: 		foreach (sort split(/:/,$ENV{$envkey})) {
  506: 		    if ($_) {
  507: 			my ($prv,$restr)=split(/\&/,$_);
  508: 			my $trestr='';
  509: 			if ($restr ne 'F') {
  510: 			    my $i;
  511: 			    $trestr.=' (';
  512: 			    for ($i=0;$i<length($restr);$i++) {
  513: 				$trestr.=
  514: 			       Apache::lonnet::plaintext(substr($restr,$i,1));
  515: 				if ($i<length($restr)-1) { $trestr.=', '; }
  516: 			    }
  517: 			    $trestr.=')';
  518: 			}
  519: 			$r->print('<li>'.
  520: 				  Apache::lonnet::plaintext($prv).$trestr.
  521: 				  '</li>');
  522: 		    }
  523: 		}
  524: 		$r->print('</ul>');
  525: 	    }
  526: 	}
  527:     }
  528: 
  529:     $r->print("</body></html>\n");
  530:     return OK;
  531: } 
  532: 
  533: 1;
  534: __END__
  535: 
  536: =head1 NAME
  537: 
  538: Apache::lonroles - User Roles Screen
  539: 
  540: =head1 SYNOPSIS
  541: 
  542: Invoked by /etc/httpd/conf/srm.conf:
  543: 
  544:  <Location /adm/roles>
  545:  PerlAccessHandler       Apache::lonacc
  546:  SetHandler perl-script
  547:  PerlHandler Apache::lonroles
  548:  ErrorDocument     403 /adm/login
  549:  ErrorDocument	  500 /adm/errorhandler
  550:  </Location>
  551: 
  552: =head1 INTRODUCTION
  553: 
  554: This module enables a user to select what role he wishes to
  555: operate under (instructor, student, teaching assistant, course
  556: coordinator, etc).  These roles are pre-established by the actions
  557: of upper-level users.
  558: 
  559: This is part of the LearningOnline Network with CAPA project
  560: described at http://www.lon-capa.org.
  561: 
  562: =head1 HANDLER SUBROUTINE
  563: 
  564: This routine is called by Apache and mod_perl.
  565: 
  566: =over 4
  567: 
  568: =item *
  569: 
  570: Roles Initialization (yes/no)
  571: 
  572: =item *
  573: 
  574: Get Error Message from Environment
  575: 
  576: =item *
  577: 
  578: Who is this?
  579: 
  580: =item *
  581: 
  582: Generate Page Output
  583: 
  584: =item *
  585: 
  586: Choice or no choice
  587: 
  588: =item *
  589: 
  590: Table
  591: 
  592: =item *
  593: 
  594: Privileges
  595: 
  596: =back
  597: 
  598: =cut

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