version 1.60, 2002/11/08 20:51:48
|
version 1.64, 2003/02/13 21:35:50
|
Line 93 sub modifystudent {
|
Line 93 sub modifystudent {
|
} |
} |
} |
} |
if ($result eq '') { |
if ($result eq '') { |
$result eq 'Unable to find section for this student'; |
$result = 'Unable to find section for this student'; |
} else { |
} else { |
$result =~ s/(ok:)+/ok/g; |
$result =~ s/(ok:)+/ok/g; |
} |
} |
Line 221 function verify_message (vf,founduname,f
|
Line 221 function verify_message (vf,founduname,f
|
alert('You need to specify the username field'); |
alert('You need to specify the username field'); |
return; |
return; |
} |
} |
|
// alert('current.radiovalue = '+current.radiovalue); |
if (current.radiovalue == null || current.radiovalue == 'nochange') { |
if (current.radiovalue == null || current.radiovalue == 'nochange') { |
// They did not check any of the login radiobuttons. |
// They did not check any of the login radiobuttons. |
alert('You must choose an authentication type'); |
alert('You must choose an authentication type'); |
Line 460 ENDPICK
|
Line 461 ENDPICK
|
############################################################### |
############################################################### |
sub print_upload_manager_footer { |
sub print_upload_manager_footer { |
my ($r,$i,$keyfields,$defdom,$today,$halfyear)=@_; |
my ($r,$i,$keyfields,$defdom,$today,$halfyear)=@_; |
my %param = ( formname => 'document.studentform'); |
|
|
my ($krbdef,$krbdefdom) = |
|
&Apache::loncommon::get_kerberos_defaults($defdom); |
|
my %param = ( formname => 'document.studentform', |
|
kerb_def_dom => $krbdefdom, |
|
kerb_def_auth => $krbdef |
|
); |
my $krbform = &Apache::loncommon::authform_kerberos(%param); |
my $krbform = &Apache::loncommon::authform_kerberos(%param); |
my $intform = &Apache::loncommon::authform_internal(%param); |
my $intform = &Apache::loncommon::authform_internal(%param); |
my $locform = &Apache::loncommon::authform_local(%param); |
my $locform = &Apache::loncommon::authform_local(%param); |
Line 521 sub print_upload_manager_form {
|
Line 528 sub print_upload_manager_form {
|
my @records=&Apache::loncommon::upfile_record_sep(); |
my @records=&Apache::loncommon::upfile_record_sep(); |
my $total=$#records; |
my $total=$#records; |
my $distotal=$total+1; |
my $distotal=$total+1; |
$ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/; |
|
my $krbdefdom=$1; |
|
$krbdefdom=~tr/a-z/A-Z/; |
|
my $today=time; |
my $today=time; |
my $halfyear=$today+15552000; |
my $halfyear=$today+15552000; |
my $defdom=$r->dir_config('lonDefDomain'); |
my $defdom=$r->dir_config('lonDefDomain'); |
|
my ($krbdef,$krbdefdom) = |
|
&Apache::loncommon::get_kerberos_defaults($defdom); |
&print_upload_manager_header($r,$datatoken,$distotal,$krbdefdom); |
&print_upload_manager_header($r,$datatoken,$distotal,$krbdefdom); |
my $i; |
my $i; |
my $keyfields; |
my $keyfields; |
Line 628 sub enroll_single_student {
|
Line 634 sub enroll_single_student {
|
sub print_enroll_single_student_form { |
sub print_enroll_single_student_form { |
my $r=shift; |
my $r=shift; |
$r->print("<h3>Enroll One Student</h3>"); |
$r->print("<h3>Enroll One Student</h3>"); |
my ($krbdefdom) = $ENV{'SERVER_NAME'}=~/(\w+\.\w+)$/; |
|
$krbdefdom=~tr/a-z/A-Z/; |
|
my $today = time; |
my $today = time; |
my $halfyear = $today+15552000; |
my $halfyear = $today+15552000; |
my $defdom=$r->dir_config('lonDefDomain'); |
my $defdom=$r->dir_config('lonDefDomain'); |
my $javascript_validations=&javascript_validations($krbdefdom); |
|
# Set up authentication forms |
# Set up authentication forms |
my %param = ( formname => 'document.studentform'); |
my ($krbdef,$krbdefdom) = |
|
&Apache::loncommon::get_kerberos_defaults($defdom); |
|
my $javascript_validations=&javascript_validations($krbdefdom); |
|
my %param = ( formname => 'document.studentform', |
|
kerb_def_dom => $krbdefdom, |
|
kerb_def_auth => $krbdef |
|
); |
my $krbform = &Apache::loncommon::authform_kerberos(%param); |
my $krbform = &Apache::loncommon::authform_kerberos(%param); |
my $intform = &Apache::loncommon::authform_internal(%param); |
my $intform = &Apache::loncommon::authform_internal(%param); |
my $locform = &Apache::loncommon::authform_local(%param); |
my $locform = &Apache::loncommon::authform_local(%param); |
Line 772 END
|
Line 781 END
|
$r->print(<<END); |
$r->print(<<END); |
<font size="+1"> |
<font size="+1"> |
<a href="javascript:document.studentform.state.value='csv';document.studentform.submit();">CSV format</a> |
<a href="javascript:document.studentform.state.value='csv';document.studentform.submit();">CSV format</a> |
|
|
<a href="javascript:document.studentform.state.value='excel';document.studentform.submit();">Excel format</a> |
<a href="javascript:document.studentform.state.value='excel';document.studentform.submit();">Excel format</a> |
</font> |
</font> |
|
|
|
Student Status: |
END |
END |
} |
} |
$r->print($status_select."</p>\n"); |
$r->print($status_select."</p>\n"); |
Line 1083 sub modify_single_student {
|
Line 1094 sub modify_single_student {
|
my $displayable_endtime = localtime($endtime); |
my $displayable_endtime = localtime($endtime); |
# |
# |
# check for forceid override |
# check for forceid override |
if (($sid ne $old{'id'}) && (! exists($ENV{'form.forceid'}))) { |
if ((defined($old{'id'})) && ($old{'id'} ne '') && |
|
($sid ne $old{'id'}) && (! exists($ENV{'form.forceid'}))) { |
$r->print("<font color=\"ff0000\">You changed the students id ". |
$r->print("<font color=\"ff0000\">You changed the students id ". |
" but did not disable the ID change safeguard.". |
" but did not disable the ID change safeguard.". |
" The students id will not be changed.</font>"); |
" The students id will not be changed.</font>"); |
Line 1134 sub modify_single_student {
|
Line 1146 sub modify_single_student {
|
<p> |
<p> |
END |
END |
# |
# |
# Send request(s) to modify data |
# Send request(s) to modify data (final undef is for 'desiredhost', |
|
# which is a moot point because the student already has an account. |
|
my $modify_section_results = &modifystudent($sdom,$slogin, |
|
$ENV{'request.course.id'}, |
|
$section,undef); |
|
if ($modify_section_results !~ /^ok/) { |
|
$r->print("An error occured during the attempt to change the ". |
|
"section for this student.<br />"); |
|
} |
my $roleresults = &Apache::lonnet::modifystudent |
my $roleresults = &Apache::lonnet::modifystudent |
($sdom,$slogin,$sid,undef,undef,$firstname,$middlename,$lastname, |
($sdom,$slogin,$sid,undef,undef,$firstname,$middlename,$lastname, |
$generation,$section,$endtime,$starttime,$ENV{'form.forceid'}); |
$generation,$section,$endtime,$starttime,$ENV{'form.forceid'}); |