--- loncom/interface/loncreateuser.pm 2003/07/19 00:51:05 1.63
+++ loncom/interface/loncreateuser.pm 2004/01/17 18:12:05 1.77
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.63 2003/07/19 00:51:05 www Exp $
+# $Id: loncreateuser.pm,v 1.77 2004/01/17 18:12:05 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -29,10 +29,41 @@
package Apache::loncreateuser;
+=pod
+
+=head1 NAME
+
+Apache::loncreateuser - handler to create users and custom roles
+
+=head1 SYNOPSIS
+
+Apache::loncreateuser provides an Apache handler for creating users,
+ editing their login parameters, roles, and removing roles, and
+ also creating and assigning custom roles.
+
+=head1 OVERVIEW
+
+=head2 Custom Roles
+
+In LON-CAPA, roles are actually collections of privileges. "Teaching
+Assistant", "Course Coordinator", and other such roles are really just
+collection of privileges that are useful in many circumstances.
+
+Creating custom roles can be done by the Domain Coordinator through
+the Create User functionality. That screen will show all privileges
+that can be assigned to users. For a complete list of privileges,
+please see C.
+
+Custom role definitions are stored in the C file of the role
+author.
+
+=cut
+
use strict;
use Apache::Constants qw(:common :http);
use Apache::lonnet;
use Apache::loncommon;
+use Apache::lonlocal;
my $loginscript; # piece of javascript used in two separate instances
my $generalrule;
@@ -93,13 +124,26 @@ sub print_username_entry_form {
my @domains = &Apache::loncommon::get_domains();
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain');
my $bodytag =&Apache::loncommon::bodytag(
- 'Create Users, Change User Privileges');
+ 'Create Users, Change User Privileges').
+ &Apache::loncommon::help_open_faq(282).
+ &Apache::loncommon::help_open_bug('Instructor Interface');
my $selscript=&Apache::loncommon::studentbrowser_javascript();
my $sellink=&Apache::loncommon::selectstudent_link
('crtuser','ccuname','ccdomain');
my %existingroles=&my_custom_roles();
my $choice=&Apache::loncommon::select_form('make new role','rolename',
('make new role' => 'Generate new role ...',%existingroles));
+ my %lt=&Apache::lonlocal::texthash(
+ 'siur' => "Set Individual User Roles",
+ 'usr' => "Username",
+ 'dom' => "Domain",
+ 'usrr' => "User Roles",
+ 'ecrp' => "Edit Custom Role Privileges",
+ 'nr' => "Name of Role",
+ 'cre' => "Custom Role Editor"
+ );
+ my $helpsiur=&Apache::loncommon::help_open_topic('Course_Change_Privileges');
+ my $helpecpr=&Apache::loncommon::help_open_topic('Course_Editing_Custom_Roles');
$r->print(<<"ENDDOCUMENT");
@@ -109,19 +153,19 @@ $selscript
$bodytag