--- loncom/interface/statistics/lonproblemstatistics.pm 2013/12/30 14:05:21 1.122.2.2 +++ loncom/interface/statistics/lonproblemstatistics.pm 2014/03/03 20:45:05 1.122.2.3 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonproblemstatistics.pm,v 1.122.2.2 2013/12/30 14:05:21 raeburn Exp $ +# $Id: lonproblemstatistics.pm,v 1.122.2.3 2014/03/03 20:45:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -182,7 +182,7 @@ my @Fields = ( format => '%d', sortable => 'yes', graphable => 'yes', - long_title => 'Minumum Number of Tries', + long_title => 'Minimum Number of Tries', selectable => 'yes', defaultselected => 'yes', }, @@ -438,7 +438,7 @@ my @SeqFields = ( format => '%4.2f', sortable => 'no', graphable => 'no', - long_title => 'Minumum Sequence Score', + long_title => 'Minimum Sequence Score', selectable => 'yes', defaultselected => 'no', }, @@ -493,7 +493,7 @@ my @SeqFields = ( format => '%4.2f', sortable => 'no', graphable => 'no', - long_title => 'Minumum Number of Correct Problems', + long_title => 'Minimum Number of Correct Problems', selectable => 'yes', defaultselected => 'no', }, @@ -586,14 +586,14 @@ sub parse_field_selection { sub field_selection_input { my $Str = '\n"; } @@ -618,7 +618,6 @@ sub CreateInterface { &parse_field_selection(); # my $Str = ''; - $Str .= '

'; $Str .= &Apache::loncommon::start_data_table(); $Str .= &Apache::loncommon::start_data_table_header_row(); $Str .= ''.&mt('Sections').''; @@ -644,14 +643,13 @@ sub CreateInterface { $Str .= &field_selection_input(); $Str .= ''; $Str .= &plot_dropdown(); - $Str .= ''."\n"; + $Str .= "\n"; $Str .= ''; $Str .= &Apache::lonstathelpers::limit_by_time_form(); $Str .= ''."\n"; $Str .= &Apache::loncommon::end_data_table_row(); $Str .= &Apache::loncommon::end_data_table(); # - $Str .= '

'; $Str .= ''; $Str .= (' 'x10); @@ -801,9 +799,8 @@ sub output_sequence_statistics { $r->print('

'.&mt('Sequence Statistics'). &Apache::loncommon::help_open_topic('Statistics_Sequence'). '

'); - $r->print(&Apache::loncommon::start_data_table().&Apache::loncommon::start_data_table_header_row()); + $r->print(&Apache::loncommon::start_data_table()); $r->print(&sequence_html_header()); - $r->print(&Apache::loncommon::end_data_table_header_row()); foreach my $seq (@sequences) { last if ($c->aborted); &compute_sequence_statistics($seq); @@ -825,7 +822,7 @@ sub output_sequence_statistics { sub output_html_by_sequence { my ($r) = @_; my $c = $r->connection(); - $r->print('
'.&html_preamble()); + $r->print('
'.&html_preamble()); # foreach my $seq (@sequences) { last if ($c->aborted); @@ -929,14 +926,16 @@ sub statistics_table_header { next if ($options =~ /no $field->{'name'}/); next if ($field->{'selected'} ne 'yes'); $header_row .= ''; + my $header_row_text = &mt($field->{'title'}); if (exists($field->{'sortable'}) && $field->{'sortable'} eq 'yes') { - $header_row .= '{'name'}."'". - ';document.Statistics.submit();">'; - } - $header_row .= &mt($field->{'title'}); - if ($options =~ /sortable/) { - $header_row.= ''; + ';document.Statistics.submit();">'. + $header_row_text. + ''; + } else { + $header_row .= $header_row_text; } if ($options !~ /no plots/ && exists($field->{'graphable'}) && @@ -953,13 +952,13 @@ sub statistics_table_header { } sub sequence_html_header { - my $Str .= ''; + my $Str .= &Apache::loncommon::start_data_table_header_row(); foreach my $field (@SeqFields) { # next if ($field->{'selected'} ne 'yes'); $Str .= '{'title'}.''; + $Str .= '>'.&mt($field->{'title'}).''; } - $Str .= ''; + $Str .= &Apache::loncommon::end_data_table_header_row(); return $Str; } @@ -967,7 +966,7 @@ sub sequence_html_header { sub sequence_html_output { my ($seq) = @_; my $data = $SeqStat{$seq->symb}; - my $row = ''; + my $row = &Apache::loncommon::start_data_table_row(); foreach my $field (@SeqFields) { next if ($field->{'selected'} ne 'yes'); $row .= 'write($rows_output,$cols_output++,$time_string); @@ -1362,7 +1362,7 @@ sub Excel_output { # # Put the date in there too $excel_sheet->write($rows_output,$cols_output++, - 'Compiled on '.localtime(time)); + &mt('Compiled on [_1]',&Apache::lonlocal::locallocaltime(time))); # $rows_output++; $cols_output=0;