--- loncom/interface/lonuserutils.pm 2010/09/20 00:26:44 1.109.2.5 +++ loncom/interface/lonuserutils.pm 2010/11/08 21:11:14 1.109.2.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.109.2.5 2010/09/20 00:26:44 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.109.2.7 2010/11/08 21:11:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -330,7 +330,7 @@ sub print_upload_manager_header { my ($sectionjs,$groupslist); if ($context eq 'course') { $groupslist = &get_groupslist(); - if ($env{'form.caller'} eq 'requestcrs') { + if ($env{'form.context'} eq 'requestcrs') { $sectionjs = <<"ENDJS"; function toggleSectionsDefault() { @@ -375,7 +375,7 @@ ENDJS &hidden_input('fileupload',$env{'form.fileupload'}). &hidden_input('upfiletype',$env{'form.upfiletype'}). &hidden_input('upfile_associate',$env{'form.upfile_associate'}). - &hidden_input('caller',$env{'form.caller'})); + &hidden_input('context',$env{'form.context'})); $r->print('

'); $r->print('
=3) && - (eval('vf.f'+i+'.selectedIndex')<=6)) { + if ((eval('vf.f'+i+'.selectedIndex')>=4) && + (eval('vf.f'+i+'.selectedIndex')<=7)) { eval('vf.f'+i+'.selectedIndex=0;') } } } - // If we set this to one of 'fname','mname','lname','gen' (3,4,5,6), - // clear out any that are set to 'lastname, firstnames' (2) - if ((nw>=3) && (nw<=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' (3) + if ((nw>=4) && (nw<=7)) { 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;') } } @@ -735,7 +735,7 @@ function flip(vf,tf) { function clearpwd(vf) { var 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;') } } @@ -838,8 +838,8 @@ sub print_upload_manager_footer { $env{'form.ipwd_choice'} ne '') { $param{'curr_authtype'} = 'int'; } - if ($env{'form.caller'} eq 'requestcrs') { - $param{'caller'} = $env{'form.caller'}; + if ($env{'form.context'} eq 'requestcrs') { + $param{'context'} = $env{'form.context'}; } my $krbform = &Apache::loncommon::authform_kerberos(%param); my $intform = &Apache::loncommon::authform_internal(%param); @@ -853,7 +853,7 @@ sub print_upload_manager_footer { $Str .= '

'.&mt('Options').'

' .&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')); } else { $Str .= &Apache::lonhtmlcommon::row_title(&mt('Login Type')); @@ -879,7 +879,7 @@ sub print_upload_manager_footer { $Str .= "

\n"; } $Str .= &set_login($defdom,$krbform,$intform,$locform); - if ($env{'form.caller'} eq 'requestcrs') { + if ($env{'form.context'} eq 'requestcrs') { $Str .= ''; } my ($home_server_pick,$numlib) = @@ -897,7 +897,7 @@ sub print_upload_manager_footer { &Apache::lonhtmlcommon::row_closure(); } - unless ($env{'form.caller'} eq 'requestcrs') { + unless ($env{'form.context'} eq 'requestcrs') { $Str .= &Apache::lonhtmlcommon::row_title(&mt('Default domain')) .&Apache::loncommon::select_dom_form($defdom,'defaultdomain',undef,1) .&Apache::lonhtmlcommon::row_closure() @@ -924,7 +924,7 @@ sub print_upload_manager_footer { &mt('Default role')) .&mt('Choose the role to assign to users without a value specified in the uploaded file.') } elsif ($context eq 'course') { - if ($env{'form.caller'} eq 'requestcrs') { + if ($env{'form.context'} eq 'requestcrs') { $Str .= &Apache::lonhtmlcommon::row_title(&mt('Default section')). &mt('Students can be assigned to different sections.').'
'. &mt('Will you be using sections?').' '. @@ -964,7 +964,7 @@ sub print_upload_manager_footer { } else { my ($cnum,$cdom) = &get_course_identity(); my ($rowtitle,$closure); - if ($env{'form.caller'} eq 'requestcrs') { + if ($env{'form.context'} eq 'requestcrs') { $closure = 1; $rowtitle = &mt('default section name (letters/numbers only)'); } else { @@ -972,9 +972,9 @@ sub print_upload_manager_footer { } my $secbox = §ion_picker($cdom,$cnum,'Any',$rowtitle, $permission,$context,'upload',$crstype, - $env{'form.caller'}). + $env{'form.context'}). &Apache::lonhtmlcommon::row_closure($closure); - if ($env{'form.caller'} eq 'requestcrs') { + if ($env{'form.context'} eq 'requestcrs') { $Str .= ''; } else { $Str .= $secbox; @@ -991,7 +991,7 @@ sub print_upload_manager_footer { 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')) .'