--- loncom/interface/loncreateuser.pm 2001/02/19 22:58:53 1.2
+++ loncom/interface/loncreateuser.pm 2001/11/16 07:00:53 1.21
@@ -1,4 +1,4 @@
-# The LearningOnline Network
+# The LearningOnline Network with CAPA
# Create a user
#
# (Create a course
@@ -10,20 +10,154 @@
# 5/21/99,5/22,5/25,5/26,5/31,6/2,6/10,7/12,7/14,
# 1/14/00,5/29,5/30,6/1,6/29,7/1,11/9 Gerd Kortemeyer)
#
+# YEAR=2001
# 3/1/1 Gerd Kortemeyer)
#
# 3/1 Gerd Kortemeyer)
#
# 2/14 Gerd Kortemeyer)
#
-# 2/14,2/17,2/19 Gerd Kortemeyer
+# 2/14,2/17,2/19,2/20,2/21,2/22,2/23,3/2,3/17,3/24,04/12 Gerd Kortemeyer
+# April Guy Albertelli
+# 05/10,10/16 Gerd Kortemeyer
+# 11/12,11/13,11/15 Scott Harrison
#
+# $Id: loncreateuser.pm,v 1.21 2001/11/16 07:00:53 harris41 Exp $
+###
+
package Apache::loncreateuser;
use strict;
use Apache::Constants qw(:common :http);
use Apache::lonnet;
+my $loginscript; # piece of javascript used in two separate instances
+my $generalrule;
+my $authformnop;
+my $authformkrb;
+my $authformint;
+my $authformfsys;
+my $authformloc;
+
+sub BEGIN {
+ $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/;
+ my $krbdefdom=$1;
+ $krbdefdom=~tr/a-z/A-Z/;
+ $authformnop=(<
+
+Do not change login data
+
+END
+ $authformkrb=(<
+
+Kerberos authenticated with domain
+
+
+END
+ $authformint=(<
+
+Internally authenticated (with initial password
+)
+
+END
+ $authformfsys=(<
+
+Filesystem authenticated (with initial password
+)
+
+END
+ $authformloc=(<
+
+Local Authentication with argument
+
+
+END
+ $loginscript=(<
+function setkrb(vf) {
+ if (vf.krbdom.value!='') {
+ vf.login[0].checked=true;
+ vf.krbdom.value=vf.krbdom.value.toUpperCase();
+ vf.intpwd.value='';
+ vf.fsyspwd.value='';
+ vf.locarg.value='';
+ }
+}
+
+function setint(vf) {
+ if (vf.intpwd.value!='') {
+ vf.login[1].checked=true;
+ vf.krbdom.value='';
+ vf.fsyspwd.value='';
+ vf.locarg.value='';
+ }
+}
+
+function setfsys(vf) {
+ if (vf.fsyspwd.value!='') {
+ vf.login[2].checked=true;
+ vf.krbdom.value='';
+ vf.intpwd.value='';
+ vf.locarg.value='';
+ }
+}
+
+function setloc(vf) {
+ if (vf.locarg.value!='') {
+ vf.login[3].checked=true;
+ vf.krbdom.value='';
+ vf.intpwd.value='';
+ vf.fsyspwd.value='';
+ }
+}
+
+function clicknop(vf) {
+ vf.krbdom.value='';
+ vf.intpwd.value='';
+ vf.fsyspwd.value='';
+ vf.locarg.value='';
+}
+
+function clickkrb(vf) {
+ vf.krbdom.value='$krbdefdom';
+ vf.intpwd.value='';
+ vf.fsyspwd.value='';
+ vf.locarg.value='';
+}
+
+function clickint(vf) {
+ vf.krbdom.value='';
+ vf.fsyspwd.value='';
+ vf.locarg.value='';
+}
+
+function clickfsys(vf) {
+ vf.krbdom.value='';
+ vf.intpwd.value='';
+ vf.locarg.value='';
+}
+
+function clickloc(vf) {
+ vf.krbdom.value='';
+ vf.intpwd.value='';
+ vf.fsyspwd.value='';
+}
+
+ENDLOGINSCRIPT
+ $generalrule=<
+As a general rule, only authors or co-authors should be filesystem
+authenticated (which allows access to the server filesystem).
+
+END
+}
+
# =================================================================== Phase one
sub phase_one {
@@ -53,34 +187,94 @@ sub phase_two {
my $r=shift;
my $ccuname=$ENV{'form.ccuname'};
my $ccdomain=$ENV{'form.ccdomain'};
+
+ $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/;
+ my $krbdefdom=$1;
+ $krbdefdom=~tr/a-z/A-Z/;
+
+ my $defdom=$ENV{'user.domain'};
+
$ccuname=~s/\W//g;
$ccdomain=~s/\W//g;
$r->print(<
The LearningOnline Network with CAPA
+
Create User, Change User Privileges
-