--- loncom/interface/lonuserutils.pm 2009/03/09 05:25:40 1.84 +++ loncom/interface/lonuserutils.pm 2009/05/06 13:39:16 1.91 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.84 2009/03/09 05:25:40 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.91 2009/05/06 13:39:16 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -328,7 +328,7 @@ sub print_upload_manager_header { &javascript_validations('upload',$krbdefdom,$password_choice,undef, $env{'request.role.domain'},$context, $groupslist); - my $checked=(($env{'form.noFirstLine'})?' checked="checked" ':''); + my $checked=(($env{'form.noFirstLine'})?' checked="checked"':''); $r->print(&mt('Total number of records found in file: [_1]',''.$distotal.''). "
\n"); $r->print('

'. @@ -341,7 +341,7 @@ sub print_upload_manager_header { &hidden_input('fileupload',$env{'form.fileupload'}). &hidden_input('upfiletype',$env{'form.upfiletype'}). &hidden_input('upfile_associate',$env{'form.upfile_associate'})); - $r->print('

\n". - '


'.&mt('Students selected from this list can be dropped.').'

'."\n"; } if ($context eq 'course' || $context eq 'domain') { @@ -838,13 +838,13 @@ sub forceid_change { my ($context) = @_; my $output = "

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

\n". - "

\n".'

\n".'
'."\n". &mt('(only do if you know what you are doing.)')."\n"; if ($context eq 'domain') { $output .= '
'."\n"; } @@ -1332,7 +1332,7 @@ sub print_userlist { .''.(' 'x3)."\n"); my $roleselected = ''; if ($env{'form.showrole'} eq 'Any') { - $roleselected = ' selected="selected" '; + $roleselected = ' selected="selected"'; } my ($cnum,$cdom); $r->print(&role_filter($context)); @@ -1526,7 +1526,7 @@ sub role_filter { my $output; my $roleselected = ''; if ($env{'form.showrole'} eq 'Any') { - $roleselected = ' selected="selected" '; + $roleselected = ' selected="selected"'; } my ($role_select); if ($context eq 'domain') { @@ -1542,7 +1542,7 @@ sub role_filter { foreach my $role (@poss_roles) { $roleselected = ''; if ($role eq $env{'form.showrole'}) { - $roleselected = ' selected="selected" '; + $roleselected = ' selected="selected"'; } my $plrole; if ($role eq 'cr') { @@ -2212,15 +2212,15 @@ END foreach my $item (@linkdests) { my $checkedstr = ''; if ($item eq $usernamelink) { - $checkedstr = ' checked="checked" '; + $checkedstr = ' checked="checked"'; } - $output .= '
'; + $output .= '
'; } my $checkwin; if ($env{'form.userwin'}) { - $checkwin = 'checked = "checked"'; + $checkwin = ' checked="checked"'; } - $output .= ''.$lt{'owin'}.'

'; + $output .= ''.$lt{'owin'}.''; } $output .= "\n".''."\n". &Apache::loncommon::start_data_table(). @@ -2537,7 +2537,7 @@ END } } $r->print(''); + 'actionlist" value="'.$checkval.'" />'); } else { $r->print(' '); } @@ -2572,7 +2572,7 @@ END } if ($env{'course.'.$env{'request.course.id'}.'.internal.showphoto'}) { if ($displayphotos eq 'on' && $role eq 'st' && $in{'photo'} ne '') { - $r->print(' '); + $r->print(' '); } else { $r->print('   '); } @@ -2859,8 +2859,8 @@ sub select_actions { } } if ($choices{'sections'}) { - $output .= ''."\n". - ''."\n"; + $output .= ''."\n". + ''."\n"; } } return $output; @@ -3259,7 +3259,7 @@ sub show_drop_list { $check_uncheck_js

- + END my ($indexhash,$keylist) = &make_keylist_array(); my $studentcount = 0; @@ -3377,7 +3377,7 @@ END # $r->print(&Apache::loncommon::start_data_table_row()); $r->print(<<"END"); - + $username $domain $id @@ -3396,10 +3396,14 @@ END 'ua' => "uncheck all", ); $r->print(<<"END"); -

-   - -

+

+

+   + +

+

+ +

END return; } @@ -3410,10 +3414,13 @@ END sub print_first_users_upload_form { my ($r,$context) = @_; my $str; - $str = ''; + $str = ''; $str .= ''; $str .= ''; - $str .= "

".&mt('Upload a file containing information about users')."

\n"; + $str .= '

'.&mt('Upload a file containing information about users').'

'."\n"; + $str .= '

' + .&mt('Please upload an UTF8 encoded file to ensure a correct character encoding in your classlist.') + .'

'."\n"; $str .= &Apache::loncommon::upfile_select_html(); $str .= '

'; $str .= &Apache::loncommon::help_open_topic("Course_Create_Class_List", @@ -3426,7 +3433,7 @@ sub print_first_users_upload_form { $str .= '

\n"; $str .= ''."
\n"; + &mt('Next').'" />'."
\n"; $str .= &Apache::loncommon::end_page(); $r->print($str); return; @@ -3604,6 +3611,8 @@ sub upfile_drop_add { } else { $r->print('

'.&mt('Adding/Modifying Users')."

\n

\n"); } + $r->rflush; + my %counts = ( user => 0, auth => 0,