--- loncom/interface/loncreateuser.pm 2002/03/22 22:23:23 1.28
+++ loncom/interface/loncreateuser.pm 2002/04/18 20:16:43 1.30
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Create a user
#
-# $Id: loncreateuser.pm,v 1.28 2002/03/22 22:23:23 matthew Exp $
+# $Id: loncreateuser.pm,v 1.30 2002/04/18 20:16:43 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -47,7 +47,7 @@
# 11/12,11/13,11/15 Scott Harrison
# 02/11/02 Matthew Hall
#
-# $Id: loncreateuser.pm,v 1.28 2002/03/22 22:23:23 matthew Exp $
+# $Id: loncreateuser.pm,v 1.30 2002/04/18 20:16:43 matthew Exp $
###
package Apache::loncreateuser;
@@ -70,109 +70,106 @@ BEGIN {
$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='';
+var authvalues = new Object();
+authvalues.names = new Array('krbarg','intarg','fsysarg','locarg');
+authvalues.defaults = new Array('MSU.EDU','','','');
+
+function changed_radio(choice,currentform) {
+ var choicearg = choice + 'arg';
+ if (currentform.elements[choicearg].value == '') {
+ clear(currentform,authvalues.names);
+ for (var i=0; i
ENDLOGINSCRIPT
$generalrule=<
-
-
ENDFORMINFO
my $uhome=&Apache::lonnet::homeserver($ccuname,$ccdomain);
my %incdomains;
my %inccourses;
+ my %home_servers = &get_home_servers($ccdomain);
foreach (%Apache::lonnet::hostdom) {
$incdomains{$_}=1;
}
@@ -275,6 +271,13 @@ ENDFORMINFO
}
}
if ($uhome eq 'no_host') {
+ my $home_server_list=
+ ''."\n";
+ foreach (sort keys(%home_servers)) {
+ $home_server_list.=
+ '\n";
+ }
$r->print(<Create New User
@@ -295,6 +298,7 @@ $loginscript
|
ID/Student Number
+Home Server:
Login Data
$generalrule
@@ -570,6 +574,8 @@ ENDDROW
# ================================================================= Phase Three
sub phase_three {
my $r=shift;
+ my $uhome=&Apache::lonnet::homeserver($ENV{'form.ccuname'},
+ $ENV{'form.ccdomain'});
# Error messages
my $error = 'Error:';
my $end = '