version 1.109.2.6, 2010/11/08 21:08:27
|
version 1.109.2.7, 2010/11/08 21:11:14
|
Line 330 sub print_upload_manager_header {
|
Line 330 sub print_upload_manager_header {
|
my ($sectionjs,$groupslist); |
my ($sectionjs,$groupslist); |
if ($context eq 'course') { |
if ($context eq 'course') { |
$groupslist = &get_groupslist(); |
$groupslist = &get_groupslist(); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$sectionjs = <<"ENDJS"; |
$sectionjs = <<"ENDJS"; |
|
|
function toggleSectionsDefault() { |
function toggleSectionsDefault() { |
Line 375 ENDJS
|
Line 375 ENDJS
|
&hidden_input('fileupload',$env{'form.fileupload'}). |
&hidden_input('fileupload',$env{'form.fileupload'}). |
&hidden_input('upfiletype',$env{'form.upfiletype'}). |
&hidden_input('upfiletype',$env{'form.upfiletype'}). |
&hidden_input('upfile_associate',$env{'form.upfile_associate'}). |
&hidden_input('upfile_associate',$env{'form.upfile_associate'}). |
&hidden_input('caller',$env{'form.caller'})); |
&hidden_input('context',$env{'form.context'})); |
$r->print('<br /><label><input type="checkbox" name="noFirstLine"'.$checked.' />'. |
$r->print('<br /><label><input type="checkbox" name="noFirstLine"'.$checked.' />'. |
&mt('Ignore First Line').'</label><br />'); |
&mt('Ignore First Line').'</label><br />'); |
$r->print('<br /><input type="button" value="'.&mt('Reverse Association').'" '. |
$r->print('<br /><input type="button" value="'.&mt('Reverse Association').'" '. |
Line 415 sub javascript_validations {
|
Line 415 sub javascript_validations {
|
if ($context eq 'course') { |
if ($context eq 'course') { |
if ($env{'request.course.sec'} eq '') { |
if ($env{'request.course.sec'} eq '') { |
$setsection_call = 'setSections(document.'.$param{'formname'}.",'$crstype'".');'; |
$setsection_call = 'setSections(document.'.$param{'formname'}.",'$crstype'".');'; |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$setsections_js = &newsections_javascript($param{'formname'}); |
$setsections_js = &newsections_javascript($param{'formname'}); |
} else { |
} else { |
$setsections_js = |
$setsections_js = |
Line 550 END
|
Line 550 END
|
} else { |
} else { |
$section_checks = §ion_check_js(); |
$section_checks = §ion_check_js(); |
|
|
unless ($env{'form.caller'} eq 'requestcrs') { |
unless ($env{'form.context'} eq 'requestcrs') { |
$optional_checks = (<<END); |
$optional_checks = (<<END); |
var message=''; |
var message=''; |
if (foundname==0) { |
if (foundname==0) { |
Line 598 END
|
Line 598 END
|
} |
} |
END |
END |
} |
} |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$optional_checks .= (<<END); |
$optional_checks .= (<<END); |
vf.state.value='enrolling'; |
vf.state.value='enrolling'; |
$finish |
$finish |
Line 688 function verify(vf,sec_caller) {
|
Line 688 function verify(vf,sec_caller) {
|
// |
// |
// 0 = none |
// 0 = none |
// 1 = username |
// 1 = username |
// 2 = names (lastname, firstnames) |
// 2 = ipwd (password) |
// 3 = fname (firstname) |
// 3 = names (lastname, firstnames) |
// 4 = mname (middlename) |
// 4 = fname (firstname) |
// 5 = lname (lastname) |
// 5 = mname (middlename) |
// 6 = gen (generation) |
// 6 = lname (lastname) |
// 7 = id |
// 7 = gen (generation) |
// 8 = section |
// 8 = id |
// 9 = ipwd (password) |
// 9 = section |
// 10 = email address |
// 10 = email address |
// 11 = role |
// 11 = role |
// 12 = domain |
// 12 = domain |
Line 711 function flip(vf,tf) {
|
Line 711 function flip(vf,tf) {
|
} |
} |
} |
} |
// If we set this to 'lastname, firstnames', clear out all the ones |
// If we set this to 'lastname, firstnames', clear out all the ones |
// set to 'fname','mname','lname','gen' (3,4,5,6) currently. |
// set to 'fname','mname','lname','gen' (4,5,6,7) currently. |
if (nw==2) { |
if (nw==3) { |
for (i=0;i<=vf.nfields.value;i++) { |
for (i=0;i<=vf.nfields.value;i++) { |
if ((eval('vf.f'+i+'.selectedIndex')>=3) && |
if ((eval('vf.f'+i+'.selectedIndex')>=4) && |
(eval('vf.f'+i+'.selectedIndex')<=6)) { |
(eval('vf.f'+i+'.selectedIndex')<=7)) { |
eval('vf.f'+i+'.selectedIndex=0;') |
eval('vf.f'+i+'.selectedIndex=0;') |
} |
} |
} |
} |
} |
} |
// If we set this to one of 'fname','mname','lname','gen' (3,4,5,6), |
// If we set this to one of 'fname','mname','lname','gen' (4,5,6,7), |
// clear out any that are set to 'lastname, firstnames' (2) |
// clear out any that are set to 'lastname, firstnames' (3) |
if ((nw>=3) && (nw<=6)) { |
if ((nw>=4) && (nw<=7)) { |
for (i=0;i<=vf.nfields.value;i++) { |
for (i=0;i<=vf.nfields.value;i++) { |
if (eval('vf.f'+i+'.selectedIndex')==2) { |
if (eval('vf.f'+i+'.selectedIndex')==3) { |
eval('vf.f'+i+'.selectedIndex=0;') |
eval('vf.f'+i+'.selectedIndex=0;') |
} |
} |
} |
} |
Line 735 function flip(vf,tf) {
|
Line 735 function flip(vf,tf) {
|
function clearpwd(vf) { |
function clearpwd(vf) { |
var i; |
var i; |
for (i=0;i<=vf.nfields.value;i++) { |
for (i=0;i<=vf.nfields.value;i++) { |
if (eval('vf.f'+i+'.selectedIndex')==9) { |
if (eval('vf.f'+i+'.selectedIndex')==2) { |
eval('vf.f'+i+'.selectedIndex=0;') |
eval('vf.f'+i+'.selectedIndex=0;') |
} |
} |
} |
} |
Line 838 sub print_upload_manager_footer {
|
Line 838 sub print_upload_manager_footer {
|
$env{'form.ipwd_choice'} ne '') { |
$env{'form.ipwd_choice'} ne '') { |
$param{'curr_authtype'} = 'int'; |
$param{'curr_authtype'} = 'int'; |
} |
} |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$param{'caller'} = $env{'form.caller'}; |
$param{'context'} = $env{'form.context'}; |
} |
} |
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); |
Line 853 sub print_upload_manager_footer {
|
Line 853 sub print_upload_manager_footer {
|
|
|
$Str .= '<h3>'.&mt('Options').'</h3>' |
$Str .= '<h3>'.&mt('Options').'</h3>' |
.&Apache::lonhtmlcommon::start_pick_box(); |
.&Apache::lonhtmlcommon::start_pick_box(); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default password')); |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default password')); |
} else { |
} else { |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Login Type')); |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Login Type')); |
Line 879 sub print_upload_manager_footer {
|
Line 879 sub print_upload_manager_footer {
|
$Str .= "</p>\n"; |
$Str .= "</p>\n"; |
} |
} |
$Str .= &set_login($defdom,$krbform,$intform,$locform); |
$Str .= &set_login($defdom,$krbform,$intform,$locform); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$Str .= '<input type="hidden" name="defaultdomain" value="gcitest" />'; |
$Str .= '<input type="hidden" name="defaultdomain" value="gcitest" />'; |
} |
} |
my ($home_server_pick,$numlib) = |
my ($home_server_pick,$numlib) = |
Line 897 sub print_upload_manager_footer {
|
Line 897 sub print_upload_manager_footer {
|
&Apache::lonhtmlcommon::row_closure(); |
&Apache::lonhtmlcommon::row_closure(); |
} |
} |
|
|
unless ($env{'form.caller'} eq 'requestcrs') { |
unless ($env{'form.context'} eq 'requestcrs') { |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default domain')) |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default domain')) |
.&Apache::loncommon::select_dom_form($defdom,'defaultdomain',undef,1) |
.&Apache::loncommon::select_dom_form($defdom,'defaultdomain',undef,1) |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
Line 924 sub print_upload_manager_footer {
|
Line 924 sub print_upload_manager_footer {
|
&mt('Default role')) |
&mt('Default role')) |
.&mt('Choose the role to assign to users without a value specified in the uploaded file.') |
.&mt('Choose the role to assign to users without a value specified in the uploaded file.') |
} elsif ($context eq 'course') { |
} elsif ($context eq 'course') { |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default section')). |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Default section')). |
&mt('Students can be assigned to different sections.').'<br />'. |
&mt('Students can be assigned to different sections.').'<br />'. |
&mt('Will you be using sections?').' '. |
&mt('Will you be using sections?').' '. |
Line 964 sub print_upload_manager_footer {
|
Line 964 sub print_upload_manager_footer {
|
} else { |
} else { |
my ($cnum,$cdom) = &get_course_identity(); |
my ($cnum,$cdom) = &get_course_identity(); |
my ($rowtitle,$closure); |
my ($rowtitle,$closure); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$closure = 1; |
$closure = 1; |
$rowtitle = &mt('default section name (letters/numbers only)'); |
$rowtitle = &mt('default section name (letters/numbers only)'); |
} else { |
} else { |
Line 972 sub print_upload_manager_footer {
|
Line 972 sub print_upload_manager_footer {
|
} |
} |
my $secbox = §ion_picker($cdom,$cnum,'Any',$rowtitle, |
my $secbox = §ion_picker($cdom,$cnum,'Any',$rowtitle, |
$permission,$context,'upload',$crstype, |
$permission,$context,'upload',$crstype, |
$env{'form.caller'}). |
$env{'form.context'}). |
&Apache::lonhtmlcommon::row_closure($closure); |
&Apache::lonhtmlcommon::row_closure($closure); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$Str .= '<div id ="defaultsec" style="display: none" />'.$secbox.'</div>'; |
$Str .= '<div id ="defaultsec" style="display: none" />'.$secbox.'</div>'; |
} else { |
} else { |
$Str .= $secbox; |
$Str .= $secbox; |
Line 991 sub print_upload_manager_footer {
|
Line 991 sub print_upload_manager_footer {
|
stus => 'Students selected from this list can be dropped.' |
stus => 'Students selected from this list can be dropped.' |
); |
); |
} |
} |
unless ($env{'form.caller'} eq 'requestcrs') { |
unless ($env{'form.context'} eq 'requestcrs') { |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Full Update')) |
$Str .= &Apache::lonhtmlcommon::row_title(&mt('Full Update')) |
.'<label><input type="checkbox" name="fullup" value="yes" />' |
.'<label><input type="checkbox" name="fullup" value="yes" />' |
.' '.$lt{'disp'} |
.' '.$lt{'disp'} |
Line 1001 sub print_upload_manager_footer {
|
Line 1001 sub print_upload_manager_footer {
|
} |
} |
} |
} |
if ($context eq 'course' || $context eq 'domain') { |
if ($context eq 'course' || $context eq 'domain') { |
unless ($env{'form.caller'} eq 'requestcrs') { |
unless ($env{'form.context'} eq 'requestcrs') { |
$Str .= &forceid_change($context); |
$Str .= &forceid_change($context); |
} |
} |
} |
} |
Line 3910 sub print_first_users_upload_form {
|
Line 3910 sub print_first_users_upload_form {
|
.&Apache::lonhtmlcommon::end_pick_box(); |
.&Apache::lonhtmlcommon::end_pick_box(); |
|
|
$str .= '<p>' |
$str .= '<p>' |
.'<input type="hidden" name=caller" value="'.$caller.'" />' |
.'<input type="hidden" name="context" value="'.$caller.'" />' |
.'<input type="submit" name="fileupload" value="'.&mt('Next').'" />' |
.'<input type="submit" name="fileupload" value="'.&mt('Next').'" />' |
.'</p>'; |
.'</p>'; |
|
|
Line 3935 sub upfile_drop_add {
|
Line 3935 sub upfile_drop_add {
|
$fields{$env{'form.f'.$i}}=$keyfields[$i]; |
$fields{$env{'form.f'.$i}}=$keyfields[$i]; |
} |
} |
} |
} |
if ($env{'form.fullup'} ne 'yes') { |
if (($env{'form.fullup'} ne 'yes') && ($env{'form.context'} ne 'requestcrs')) { |
$r->print('<form name="studentform" method="post" action="/adm/createuser">'."\n". |
$r->print('<form name="studentform" method="post" action="/adm/createuser">'."\n". |
'<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'); |
'<input type="hidden" name="action" value="'.$env{'form.action'}.'" />'); |
} |
} |
Line 3974 sub upfile_drop_add {
|
Line 3974 sub upfile_drop_add {
|
} |
} |
} |
} |
my ($startdate,$enddate); |
my ($startdate,$enddate); |
if ($env{'form.caller'} eq 'requestcrs') { |
if ($env{'form.context'} eq 'requestcrs') { |
$startdate = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_start_date'}; |
$startdate = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_start_date'}; |
$enddate = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_end_date'}; |
$enddate = $env{'course.'.$env{'request.course.id'}.'.default_enrollment_end_date'}; |
} else { |
} else { |