version 1.170, 2007/09/27 18:58:52
|
version 1.171, 2007/10/09 17:33:57
|
Line 262 sub print_upload_manager_header {
|
Line 262 sub print_upload_manager_header {
|
$password_choice = 'int'; |
$password_choice = 'int'; |
} |
} |
# |
# |
my $javascript_validations=&javascript_validations('auth',$krbdefdom, |
my $javascript_validations = |
$password_choice); |
&javascript_validations('auth',$krbdefdom,$password_choice,undef, |
|
$env{'request.role.domain'}); |
my $checked=(($env{'form.noFirstLine'})?' checked="checked" ':''); |
my $checked=(($env{'form.noFirstLine'})?' checked="checked" ':''); |
$r->print('<h3>'.&mt('Uploading Class List')."</h3>\n". |
$r->print('<h3>'.&mt('Uploading Class List')."</h3>\n". |
"<hr>\n". |
"<hr>\n". |
Line 293 sub print_upload_manager_header {
|
Line 294 sub print_upload_manager_header {
|
############################################################### |
############################################################### |
############################################################### |
############################################################### |
sub javascript_validations { |
sub javascript_validations { |
my ($mode,$krbdefdom,$curr_authtype,$curr_authfield)=@_; |
my ($mode,$krbdefdom,$curr_authtype,$curr_authfield,$domain)=@_; |
my $authheader; |
my $authheader; |
if ($mode eq 'auth') { |
if ($mode eq 'auth') { |
my %param = ( formname => 'studentform', |
my %param = ( formname => 'studentform', |
Line 302 sub javascript_validations {
|
Line 303 sub javascript_validations {
|
$authheader = &Apache::loncommon::authform_header(%param); |
$authheader = &Apache::loncommon::authform_header(%param); |
} elsif ($mode eq 'createcourse') { |
} elsif ($mode eq 'createcourse') { |
my %param = ( formname => 'ccrs', |
my %param = ( formname => 'ccrs', |
kerb_def_dom => $krbdefdom, |
kerb_def_dom => $krbdefdom, |
curr_authtype => $curr_authtype ); |
curr_authtype => $curr_authtype ); |
$authheader = &Apache::loncommon::authform_header(%param); |
$authheader = &Apache::loncommon::authform_header(%param); |
} elsif ($mode eq 'modifycourse') { |
} elsif ($mode eq 'modifycourse') { |
Line 331 sub javascript_validations {
|
Line 332 sub javascript_validations {
|
my $function_name =(<<END); |
my $function_name =(<<END); |
function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail) { |
function verify_message (vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail) { |
END |
END |
|
my ($authnum,%can_assign) = &Apache::loncommon::get_assignable_auth($domain); |
my $auth_checks; |
my $auth_checks; |
if ($mode eq 'createcourse') { |
if ($mode eq 'createcourse') { |
$auth_checks .= (<<END); |
$auth_checks .= (<<END); |
Line 345 END
|
Line 347 END
|
$auth_checks .= (<<END); |
$auth_checks .= (<<END); |
var foundatype=0; |
var foundatype=0; |
if (founduname==0) { |
if (founduname==0) { |
alert('$alert{'username'}'); |
alert('$alert{'username'}'); |
return; |
return; |
} |
} |
|
|
|
END |
|
if ($authnum > 1) { |
|
$auth_checks .= (<<END); |
// alert('current.radiovalue = '+current.radiovalue); |
// alert('current.radiovalue = '+current.radiovalue); |
if (current.radiovalue == null || current.radiovalue == '' || current.radiovalue == 'nochange') { |
if (current.radiovalue == null || current.radiovalue == '' || current.radiovalue == 'nochange') { |
// They did not check any of the login radiobuttons. |
// They did not check any of the login radiobuttons. |
Line 355 END
|
Line 361 END
|
return; |
return; |
} |
} |
END |
END |
|
} |
} |
} |
if ($mode eq 'createcourse') { |
if ($mode eq 'createcourse') { |
$auth_checks .= " |
$auth_checks .= " |
Line 1058 sub print_enroll_single_student_form {
|
Line 1065 sub print_enroll_single_student_form {
|
# Set up authentication forms |
# Set up authentication forms |
my ($krbdef,$krbdefdom) = |
my ($krbdef,$krbdefdom) = |
&Apache::loncommon::get_kerberos_defaults($ccdomain); |
&Apache::loncommon::get_kerberos_defaults($ccdomain); |
$javascript_validations=&javascript_validations('auth',$krbdefdom); |
$javascript_validations = |
|
&javascript_validations('auth',$krbdefdom,undef,undef,$ccdomain); |
my %param = ( formname => 'document.studentform', |
my %param = ( formname => 'document.studentform', |
kerb_def_dom => $krbdefdom, |
kerb_def_dom => $krbdefdom, |
kerb_def_auth => $krbdef |
kerb_def_auth => $krbdef |
Line 1080 sub print_enroll_single_student_form {
|
Line 1088 sub print_enroll_single_student_form {
|
# |
# |
# |
# |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'udf' => "User Data for", |
'udf' => "Personal Data", |
'fn' => "First Name", |
'fn' => "First Name", |
'mn' => "Middle Name", |
'mn' => "Middle Name", |
'ln' => "Last Name", |
'ln' => "Last Name", |
'gen' => "Generation", |
'gen' => "Generation", |
'hs' => "Home Server", |
'hs' => "Home Server", |
'pswd' => "Password", |
'pswd' => "Login Data", |
'psam' => "Please select an authentication mechanism", |
'psam' => "Please select an authentication mechanism", |
'mail' => "Email Address" |
'mail' => "Email Address" |
); |
); |
Line 1109 sub print_enroll_single_student_form {
|
Line 1117 sub print_enroll_single_student_form {
|
</table> |
</table> |
<h3>$lt{'pswd'}</h3> |
<h3>$lt{'pswd'}</h3> |
$lt{'psam'}$authhelp |
$lt{'psam'}$authhelp |
<table> |
|
<p> |
<p> |
$krbform |
|
<br /> |
|
$intform |
|
<br /> |
|
$locform |
|
</p> |
|
END |
END |
|
if ($krbform ne '') { |
|
$user_data_html .= $krbform.'<br />'; |
|
} |
|
if ($intform ne '') { |
|
$user_data_html .= $intform.'<br />'; |
|
} |
|
if ($locform ne '') { |
|
$user_data_html .= $locform.'<br />'; |
|
} |
|
$user_data_html .= "\n</p>\n" |
} else { |
} else { |
# User already exists. Do not worry about authentication |
# User already exists. Do not worry about authentication |
my %uenv = &Apache::lonnet::dump('environment',$ccdomain,$ccuname); |
my %uenv = &Apache::lonnet::dump('environment',$ccdomain,$ccuname); |
Line 2754 sub handler {
|
Line 2765 sub handler {
|
if ($env{'form.phase'} eq 'get_user_info') { |
if ($env{'form.phase'} eq 'get_user_info') { |
my ($currstate,$response,$forcenewuser,$results) = |
my ($currstate,$response,$forcenewuser,$results) = |
&Apache::loncreateuser::user_search_result($srch); |
&Apache::loncreateuser::user_search_result($srch); |
|
if ($env{'form.currstate'} eq 'modify') { |
|
$currstate = $env{'form.currstate'}; |
|
} |
if ($currstate eq 'select') { |
if ($currstate eq 'select') { |
$r->print(&header()); |
$r->print(&header()); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |