--- loncom/interface/statistics/longradinganalysis.pm 2008/09/12 14:35:45 1.8 +++ loncom/interface/statistics/longradinganalysis.pm 2014/02/12 16:51:16 1.13 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: longradinganalysis.pm,v 1.8 2008/09/12 14:35:45 bisitz Exp $ +# $Id: longradinganalysis.pm,v 1.13 2014/02/12 16:51:16 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -69,7 +69,10 @@ sub build_grading_analysis_page { my @students = @Apache::lonstatistics::Students; # if (@students < 1 && exists($env{'form.firstrun'})) { - $r->print('<h2>There are no students in the sections/groups selected</h2>'); + $r->print( + '<p class="LC_info">' + .&mt('There are no students in the sections/groups selected.') + .'</h2>'); } # #my @cache_button_HTML = @@ -120,7 +123,7 @@ sub build_grading_analysis_page { $env{'form.problemchoice'}.'" />'); # if (! defined($current_problem->{'resource'})) { - $r->print('resource is undefined'); + $r->print('<p class="LC_error">'.&mt('resource is undefined').'</p>'); } else { my $resource = $current_problem->{'resource'}; $r->print('<h1>'.$resource->compTitle.'</h1>'); @@ -130,7 +133,10 @@ sub build_grading_analysis_page { if ($resource->is_task()) { &task_analysis($r,$resource,\@students); } else { - $r->print('<h2>Analysis of '.$resource->src().' is not supported</h2>'); + $r->print( + '<p class="LC_warning">' + .&mt('Analysis of [_1] is not supported.',$resource->src()) + .'</p>'); } } $r->print('<hr />'); @@ -149,10 +155,7 @@ sub build_grading_analysis_page { sub task_analysis { my ($r,$problem,$students) = @_; - my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin - ($r,'Student Answer Compilation Status', - 'Student Answer Compilation Progress', scalar(@$students), - 'inline',undef,'Statistics','stats_status'); + my %prog_state=&Apache::lonhtmlcommon::Create_PrgWin($r,scalar(@$students)); my %graders; foreach my $student (@$students) { my $sname = $student->{'username'}; @@ -176,7 +179,7 @@ sub task_analysis { } &Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state, - &mt('last student')); + 'last student'); } @@ -274,10 +277,11 @@ sub init_excel_output { $format->{'h3'}); $excel_sheet->write($header_row,$cols_output++, - 'Compiled on '.localtime(time),$format->{'h3'}); + &mt('Compiled on [_1]',&Apache::lonlocal::locallocaltime(time)), + $format->{'h3'}); $cols_output = 0; foreach my $field ('Grader Name','Username','Grades Assigned') { - $excel_sheet->write($description_row,$cols_output++,$field, + $excel_sheet->write($description_row,$cols_output++,&mt($field), $format->{'bold'}); } return ($excel_workbook,$excel_sheet,$filename,$format,$rows_output); @@ -297,7 +301,7 @@ sub create_interface { foreach ('HTML','Excel','CSV') { $output_selector .= ' <option value="'.lc($_).'"'; if ($env{'form.output'} eq lc($_)) { - $output_selector .= ' selected '; + $output_selector .= ' selected="selected"'; } $output_selector .='>'.&mt($_).'</option>'.$/; } @@ -310,7 +314,7 @@ sub create_interface { $str .= '<td align="center"><b>'.&mt('Sections').'</b></td>'; $str .= '<td align="center"><b>'.&mt('Groups').'</b></td>'; $str .= '<td align="center"><b>'.&mt('Access Status').'</b></td>'; - $str .= '<td>'.&mt('<b>Output as</b> [_1]',$output_selector).'</td>'; + $str .= '<td>'.&mt('[_1]Output as[_2] [_3]','<b>',$output_selector,'</b>').'</td>'; $str .= '</tr>'."\n"; ## ## @@ -327,12 +331,6 @@ sub create_interface { $str .= '</td>'; # $str .= '<td>'; - ## - $str .= '<nobr><label>'.&mt('Status: [_1]', - '<input type="text" '. - 'name="stats_status" size="60" value="" />' - ). - '</label></nobr>'; $str .= '</td>'; ## ##