Diff for /loncom/auth/lonroles.pm between versions 1.62 and 1.65

version 1.62, 2003/06/24 15:52:32 version 1.65, 2003/08/05 12:52:23
Line 306  ENDHEADER Line 306  ENDHEADER
         $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>');
     }      }
     $r->print('<br>Show all roles: <input type=checkbox name=showall');      if ($ENV{'user.adv'}) {
     if ($ENV{'form.showall'}) { $r->print(' checked'); }   $r->print(
     $r->print('><input type=submit value="Display"><br>');        '<br />Show all roles: <input type="checkbox" name="showall"');
    if ($ENV{'form.showall'}) { $r->print(' checked'); }
    $r->print('><input type=submit value="Display">');
       }
 # ----------------------------------------------------------------------- Table  # ----------------------------------------------------------------------- Table
     $r->print('<table><tr>');      $r->print('<br /><table><tr>');
     unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }      unless ($nochoose) { $r->print('<th>&nbsp;</th>'); }
     $r->print('<th>User Role</th><th colspan=2>Extent</th>'.      $r->print('<th>User Role</th><th colspan=2>Extent</th>'.
       '<th>Start</th><th>End</th><th>Remark</th></tr>'."\n");        '<th>Start</th><th>End</th><th>Remark</th></tr>'."\n");
Line 567  ENDHEADER Line 570  ENDHEADER
     }      }
  }   }
     }      }
       if ($advanced) {
    $r->print('<p><small><i>This is LON-CAPA '.
     $r->dir_config('lonVersion').'</i></small></p>');
       }
     $r->print("</body></html>\n");      $r->print("</body></html>\n");
     return OK;      return OK;
 }   } 
Line 591  Invoked by /etc/httpd/conf/srm.conf: Line 597  Invoked by /etc/httpd/conf/srm.conf:
  ErrorDocument  500 /adm/errorhandler   ErrorDocument  500 /adm/errorhandler
  </Location>   </Location>
   
   =head1 OVERVIEW
   
   =head2 Choosing Roles
   
   C<lonroles> is a handler that allows a user to switch roles in
   mid-session. LON-CAPA attempts to work with "No Role Specified", the
   default role that a user has before selecting a role, as widely as
   possible, but certain handlers for example need specification which
   course they should act on, etc. Both in this scenario, and when the
   handler determines via C<lonnet>'s C<&allowed> function that a certain
   action is not allowed, C<lonroles> is used as error handler. This
   allows the user to select another role which may have permission to do
   what they were trying to do. C<lonroles> can also be accessed via the
   B<CRS> button in the Remote Control. 
   
   =begin latex
   
   \begin{figure}
   \begin{center}
   \includegraphics[width=0.45\paperwidth,keepaspectratio]{Sample_Roles_Screen}
     \caption{\label{Sample_Roles_Screen}Sample Roles Screen} 
   \end{center}
   \end{figure}
   
   =end latex
   
   =head2 Role Initialization
   
   The privileges for a user are established at login time and stored in the session environment. As a consequence, a new role does not become active till the next login. Handlers are able to query for privileges using C<lonnet>'s C<&allowed> function. When a user first logs in, their role is the "common" role, which means that they have the sum of all of their privileges. During a session it might become necessary to choose a particular role, which as a consequence also limits the user to only the privileges in that particular role.
   
 =head1 INTRODUCTION  =head1 INTRODUCTION
   
 This module enables a user to select what role he wishes to  This module enables a user to select what role he wishes to

Removed from v.1.62  
changed lines
  Added in v.1.65


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