--- loncom/interface/lonuserutils.pm 2008/06/24 16:17:05 1.59 +++ loncom/interface/lonuserutils.pm 2008/08/20 21:28:14 1.62 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.59 2008/06/24 16:17:05 bisitz Exp $ +# $Id: lonuserutils.pm,v 1.62 2008/08/20 21:28:14 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -558,7 +558,7 @@ function verify(vf,sec_caller) { if (tw==11) { foundrole=1; } if (tw==12) { founddomain=1; } } - verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail,foundrole,founddom); + verify_message(vf,founduname,foundpwd,foundname,foundid,foundsec,foundemail,foundrole,founddomain); } // @@ -779,8 +779,7 @@ sub print_upload_manager_footer { 'onClick="javascript:verify(this.form,this.form.csec)" '. 'value="'.&mt('Update Users').'" />'."
\n"; if ($context eq 'course') { - $Str .= &mt('Note: for large courses, this operation may be time '. - 'consuming'); + $Str .= &mt('Note: for large courses, this operation may be time consuming'); } $Str .= ''; $r->print($Str); @@ -790,15 +789,15 @@ sub print_upload_manager_footer { sub forceid_change { my ($context) = @_; my $output = - "

".&mt('ID/Student Number')."

\n". + "

".&mt('Student/Employee ID')."

\n". "

\n".'
'."\n". + &mt('Disable Student/Employee ID Safeguard and force change of conflicting IDs'). + '
'."\n". &mt('(only do if you know what you are doing.)')."\n"; if ($context eq 'domain') { $output .= '
'."\n"; } $output .= '

'; @@ -865,7 +864,7 @@ sub print_upload_manager_form { ['mname',&mt('Middle Names/Initials'),$env{'form.mname_choice'}], ['lname',&mt('Last Name'), $env{'form.lname_choice'}], ['gen', &mt('Generation'), $env{'form.gen_choice'}], - ['id', &mt('ID/Student Number'),$env{'form.id_choice'}], + ['id', &mt('Student/Employee ID'),$env{'form.id_choice'}], ['sec', &mt('Section'), $env{'form.sec_choice'}], ['ipwd', &mt('Initial Password'),$env{'form.ipwd_choice'}], ['email',&mt('E-mail Address'), $env{'form.email_choice'}], @@ -3593,16 +3592,8 @@ sub upfile_drop_add { ''); next; } else { - my $baddom = 0; if ($entries{$fields{'dom'}} ne &LONCAPA::clean_domain($entries{$fields{'domain'}})) { - $baddom = 1; - } else { - if (&Apache::lonnet::domain($entries{$fields{'domain'}}) eq '') { - $baddom = 1; - } - } - if ($baddom) { $r->print('
'. ''.$entries{$fields{'domain'}}. ': '.&mt('Unacceptable domain for user [_2] [_3] [_4] [_5]',$fname,$mname,$lname,$gen).''); next; @@ -4573,10 +4564,14 @@ sub can_modify_userinfo { if (ref($userroles) eq 'ARRAY') { foreach my $role (@{$userroles}) { my $testrole; - if ($role =~ /^cr\//) { - $testrole = 'cr'; - } else { + if ($context eq 'selfcreate') { $testrole = $role; + } else { + if ($role =~ /^cr\//) { + $testrole = 'cr'; + } else { + $testrole = $role; + } } if (ref($domconfig{'usermodification'}{$context}{$testrole}) eq 'HASH') { if ($domconfig{'usermodification'}{$context}{$testrole}{$field}) {