--- loncom/interface/statistics/longradinganalysis.pm 2006/05/01 19:29:13 1.4
+++ loncom/interface/statistics/longradinganalysis.pm 2014/02/26 16:01:56 1.14
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: longradinganalysis.pm,v 1.4 2006/05/01 19:29:13 albertel Exp $
+# $Id: longradinganalysis.pm,v 1.14 2014/02/26 16:01:56 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -55,6 +55,7 @@ sub build_grading_analysis_page {
#
my %saveable_parameters = ('Status' => 'scalar',
'Section' => 'array',
+ 'Group' => 'array',
);
&Apache::loncommon::store_course_settings('grading_analysis',
\%saveable_parameters);
@@ -68,7 +69,10 @@ sub build_grading_analysis_page {
my @students = @Apache::lonstatistics::Students;
#
if (@students < 1 && exists($env{'form.firstrun'})) {
- $r->print('
There are no students in the sections selected
');
+ $r->print(
+ ''
+ .&mt('There are no students in the sections/groups selected.')
+ .'
');
}
#
#my @cache_button_HTML =
@@ -119,7 +123,7 @@ sub build_grading_analysis_page {
$env{'form.problemchoice'}.'" />');
#
if (! defined($current_problem->{'resource'})) {
- $r->print('resource is undefined');
+ $r->print(''.&mt('resource is undefined').'
');
} else {
my $resource = $current_problem->{'resource'};
$r->print(''.$resource->compTitle.'
');
@@ -129,7 +133,10 @@ sub build_grading_analysis_page {
if ($resource->is_task()) {
&task_analysis($r,$resource,\@students);
} else {
- $r->print('Analysis of '.$resource->src().' is not supported
');
+ $r->print(
+ ''
+ .&mt('Analysis of [_1] is not supported.',$resource->src())
+ .'
');
}
}
$r->print('
');
@@ -148,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'};
@@ -175,7 +179,7 @@ sub task_analysis {
}
&Apache::lonhtmlcommon::Increment_PrgWin($r,\%prog_state,
- &mt('last student'));
+ 'last student');
}
@@ -196,7 +200,7 @@ sub task_analysis {
}
close($outputfile);
$r->print('
'.
- ''.&mt('Your csv file.')."\n");
+ ''.&mt('Your CSV file.')."\n");
} elsif ($env{'form.output'} eq 'excel') {
my ($excel_workbook,$excel_sheet,$filename,$format,$rows_output) =
&init_excel_output($r);
@@ -215,13 +219,17 @@ sub task_analysis {
''.
&mt('Your Excel spreadsheet.').''."\n");
} else {
- $r->print('');
- $r->print('Name (username) | Grades Assigned |
');
+ $r->print(&Apache::loncommon::start_data_table());
+ $r->print(&Apache::loncommon::start_data_table_header_row().
+ ''.&mt('Name (username)').' | '.&mt('Grades Assigned').' | '.
+ &Apache::loncommon::end_data_table_header_row() );
foreach my $line (@output) {
- $r->print(sprintf("%s (%s) | %s |
",
- @{$line}));
+ $r->print(&Apache::loncommon::start_data_table_row().
+ sprintf("%s (%s) | %s | ",
+ @{$line}).
+ &Apache::loncommon::end_data_table_row());
}
- $r->print('
');
+ $r->print(&Apache::loncommon::end_data_table());
}
&Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state);
}
@@ -263,16 +271,17 @@ sub init_excel_output {
$format->{'h1'});
$cols_output += 3;
my $sectionstring = '';
- my @Sections = &Apache::lonstatistics::get_selected_sections();
+# my @Sections = &Apache::lonstatistics::get_selected_sections(); #This is never used
$excel_sheet->write($header_row,$cols_output++,
&Apache::lonstatistics::section_and_enrollment_description('plaintext'),
$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);
@@ -292,7 +301,7 @@ sub create_interface {
foreach ('HTML','Excel','CSV') {
$output_selector .= '