version 1.14, 2001/08/07 14:07:36
|
version 1.16, 2001/09/25 18:12:43
|
Line 19
|
Line 19
|
# YEAR=2001 |
# YEAR=2001 |
# 01/01/01,01/15,02/10,02/13,02/14,02/22 Gerd Kortemeyer |
# 01/01/01,01/15,02/10,02/13,02/14,02/22 Gerd Kortemeyer |
# 8/6 Scott Harrison |
# 8/6 Scott Harrison |
|
# Guy Albertelli |
|
# 9/25 Gerd Kortemeyer |
|
|
package Apache::londropadd; |
package Apache::londropadd; |
|
|
Line 150 sub dropstudent {
|
Line 152 sub dropstudent {
|
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
if ($key=~/^$courseid(?:\/)*(\w+)*\_st$/) { |
my $section=$1; |
my $section=$1; |
if ($key eq $courseid.'_st') { $section=''; } |
if ($key eq $courseid.'_st') { $section=''; } |
if ($section ne $csec) { |
if (((!$section) && (!$csec)) || ($section ne $csec)) { |
my ($dummy,$end,$start)=split(/\_/, |
my ($dummy,$end,$start)=split(/\_/, |
&Apache::lonnet::unescape($value)); |
&Apache::lonnet::unescape($value)); |
my $now=time; |
my $now=time; |
Line 260 function verify(vf) {
|
Line 262 function verify(vf) {
|
return; |
return; |
} |
} |
} |
} |
|
if (vf.login[2].checked) { |
|
foundatype=1; |
|
//An argument is not required |
|
} |
if (foundatype==0) { |
if (foundatype==0) { |
alert('You need to set the login type'); |
alert('You need to set the login type'); |
return; |
return; |
Line 318 function flip(vf,tf) {
|
Line 324 function flip(vf,tf) {
|
vf.login[1].checked=true; |
vf.login[1].checked=true; |
vf.intpwd.value=''; |
vf.intpwd.value=''; |
vf.krbdom.value=''; |
vf.krbdom.value=''; |
|
vf.locarg.value=''; |
} |
} |
|
|
} |
} |
Line 434 ENDPICK
|
Line 441 ENDPICK
|
<input type=hidden name=nfields value=$i> |
<input type=hidden name=nfields value=$i> |
<input type=hidden name=keyfields value="$keyfields"> |
<input type=hidden name=keyfields value="$keyfields"> |
<h3>Login Type</h3> |
<h3>Login Type</h3> |
Note: this will not take effect if the user already exists<p> |
<p>Note: this will not take effect if the user already exists</p> |
<input type=radio name=login value=krb onClick="clickkrb(this.form);"> |
<p> |
|
<input type=radio name=login value=krb onClick="clickkrb(this.form);" /> |
Kerberos authenticated with domain |
Kerberos authenticated with domain |
<input type=text size=10 name=krbdom onChange="setkrb(this.form);"><p> |
<input type=text size=10 name=krbdom onChange="setkrb(this.form);" /> |
<input type=radio name=login value=int onClick="clickint(this.form);"> |
</p> |
|
<p> |
|
<input type=radio name=login value=int onClick="clickint(this.form);" /> |
Internally authenticated (with initial password |
Internally authenticated (with initial password |
<input type=text size=10 name=intpwd onChange="setint(this.form);">) |
<input type=text size=10 name=intpwd onChange="setint(this.form);" />) |
|
</p> |
|
<p> |
|
<input type=radio name=login value=loc onClick="clickloc(this.form);" /> |
|
Local Authentication with argument |
|
<input type=text size=10 name=locarg onChange="setloc(this.form);" /> |
|
</p> |
<h3>LON-CAPA Domain for Students</h3> |
<h3>LON-CAPA Domain for Students</h3> |
LON-CAPA domain: <input type=text size=10 value=$defdom name=lcdomain><p> |
LON-CAPA domain: <input type=text size=10 value=$defdom name=lcdomain><p> |
<h3>Starting and Ending Dates</h3> |
<h3>Starting and Ending Dates</h3> |
Line 479 sub enroll_single_student {
|
Line 495 sub enroll_single_student {
|
} elsif ($ENV{'form.login'} eq 'int') { |
} elsif ($ENV{'form.login'} eq 'int') { |
$amode='internal'; |
$amode='internal'; |
$genpwd=$ENV{'form.intpwd'}; |
$genpwd=$ENV{'form.intpwd'}; |
} |
} elsif ($ENV{'form.login'} eq 'loc') { |
|
$amode='localauth'; |
|
$genpwd=$ENV{'form.locarg'}; |
|
if (!$genpwd) { $genpwd=" "; } |
|
} |
if (($amode) && ($genpwd)) { |
if (($amode) && ($genpwd)) { |
&dropstudent($ENV{'form.cdomain'},$ENV{'form.cuname'}, |
&dropstudent($ENV{'form.cdomain'},$ENV{'form.cuname'}, |
$ENV{'request.course.id'},$ENV{'form.csec'}); |
$ENV{'request.course.id'},$ENV{'form.csec'}); |
Line 555 function verify(vf) {
|
Line 575 function verify(vf) {
|
return; |
return; |
} |
} |
} |
} |
|
if (vf.login[2].checked) { |
|
foundatype=1; |
|
//An argument is not required |
|
} |
if (foundatype==0) { |
if (foundatype==0) { |
alert('You need to set the login type'); |
alert('You need to set the login type'); |
return; |
return; |
Line 591 function setkrb(vf) {
|
Line 615 function setkrb(vf) {
|
vf.login[0].checked=true; |
vf.login[0].checked=true; |
vf.krbdom.value=vf.krbdom.value.toUpperCase(); |
vf.krbdom.value=vf.krbdom.value.toUpperCase(); |
vf.intpwd.value=''; |
vf.intpwd.value=''; |
|
vf.locarg.value=''; |
} |
} |
} |
} |
|
|
Line 598 function setint(vf) {
|
Line 623 function setint(vf) {
|
if (vf.intpwd.value!='') { |
if (vf.intpwd.value!='') { |
vf.login[1].checked=true; |
vf.login[1].checked=true; |
vf.krbdom.value=''; |
vf.krbdom.value=''; |
|
vf.locarg.value=''; |
|
} |
|
} |
|
|
|
function setloc(vf) { |
|
if (vf.locarg.value!='') { |
|
vf.login[2].checked=true; |
|
vf.krbdom.value=''; |
|
vf.intpwd.value=''; |
} |
} |
} |
} |
|
|
function clickkrb(vf) { |
function clickkrb(vf) { |
vf.krbdom.value='$krbdefdom'; |
vf.krbdom.value='$krbdefdom'; |
vf.intpwd.value=''; |
vf.intpwd.value=''; |
|
vf.locarg.value=''; |
} |
} |
|
|
function clickint(vf) { |
function clickint(vf) { |
vf.krbdom.value=''; |
vf.krbdom.value=''; |
|
vf.locarg.value=''; |
|
} |
|
|
|
function clickloc(vf) { |
|
vf.krbdom.value=''; |
|
vf.intpwd.value=''; |
} |
} |
|
|
function pclose() { |
function pclose() { |
Line 659 Kerberos authenticated with domain
|
Line 700 Kerberos authenticated with domain
|
<input type=radio name=login value=int onClick="clickint(this.form);"> |
<input type=radio name=login value=int onClick="clickint(this.form);"> |
Internally authenticated (with initial password |
Internally authenticated (with initial password |
<input type=text size=10 name=intpwd onChange="setint(this.form);">) |
<input type=text size=10 name=intpwd onChange="setint(this.form);">) |
|
<p> |
|
<input type=radio name=login value=loc onClick="clickloc(this.form);" /> |
|
Local Authentication with argument |
|
<input type=text size=10 name=locarg onChange="setloc(this.form);" /> |
|
</p> |
<h3>Starting and Ending Dates</h3> |
<h3>Starting and Ending Dates</h3> |
<input type="hidden" value='' name="pres_value"> |
<input type="hidden" value='' name="pres_value"> |
<input type="hidden" value='' name="pres_type"> |
<input type="hidden" value='' name="pres_type"> |
Line 770 sub upfile_drop_add {
|
Line 815 sub upfile_drop_add {
|
if ((defined($ENV{'form.intpwd'})) && ($ENV{'form.intpwd'})) { |
if ((defined($ENV{'form.intpwd'})) && ($ENV{'form.intpwd'})) { |
$genpwd=$ENV{'form.intpwd'}; |
$genpwd=$ENV{'form.intpwd'}; |
} |
} |
} |
} elsif ($ENV{'form.login'} eq 'loc') { |
|
$amode='localauth'; |
|
if ((defined($ENV{'form.locarg'})) && ($ENV{'form.locarg'})) { |
|
$genpwd=$ENV{'form.locarg'}; |
|
} |
|
} |
unless (($domain=~/\W/) || ($amode eq '')) { |
unless (($domain=~/\W/) || ($amode eq '')) { |
$r->print('<h3>Enrolling Students</h3>'); |
$r->print('<h3>Enrolling Students</h3>'); |
my $count=0; |
my $count=0; |