--- loncom/interface/lonuserutils.pm 2007/12/26 14:38:13 1.36 +++ loncom/interface/lonuserutils.pm 2008/01/01 17:24:59 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.36 2007/12/26 14:38:13 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.37 2008/01/01 17:24:59 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -76,7 +76,7 @@ sub modifystudent { } } if ($result eq '') { - $result = 'Unable to find section for this student'; + $result = &mt('Unable to find section for this student'); } else { $result =~ s/(ok:)+/ok/g; } @@ -333,17 +333,12 @@ sub print_upload_manager_header { sub javascript_validations { my ($mode,$krbdefdom,$curr_authtype,$curr_authfield,$domain, $context,$groupslist)=@_; - my %param = ( kerb_def_dom => $krbdefdom, curr_authtype => $curr_authtype, ); - if ($mode eq 'createuser') { - $param{'formname'} = 'cu'; - } elsif ($mode eq 'upload') { + if ($mode eq 'upload') { $param{'formname'} = 'studentform'; - } elsif ($mode eq 'singlestudent') { - $param{'formname'} = 'cu'; } elsif ($mode eq 'createcourse') { $param{'formname'} = 'ccrs'; } elsif ($mode eq 'modifycourse') { @@ -367,7 +362,7 @@ sub javascript_validations { } } elsif ($context eq 'domain') { $setsection_call = 'setCourse()'; - $setsections_js = &dc_setcourse_js($param{'formname'},$mode); + $setsections_js = &dc_setcourse_js($param{'formname'},$mode,$context); } $finish = " var checkSec = $setsection_call\n". " if (checkSec == 'ok') {\n". @@ -389,8 +384,7 @@ sub javascript_validations { role => 'The optional role field was not specified.', continue => 'Continue adding users?', ); - - my $function_name =(< 0) { + var loginpicked = 0; + for (var i=0; i 'You must choose an authentication type.', + krb => 'You need to specify the Kerberos domain.', + ipass => 'You need to specify the initial password.', + ); + return %alerts; +} + 1;