--- loncom/interface/statistics/lonproblemstatistics.pm 2012/05/12 03:17:43 1.122.2.1
+++ 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.1 2012/05/12 03:17:43 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
#
@@ -73,6 +73,14 @@ my %SeqStat; # keys are symbs, values
## header for plots created with Graph.pm, both of which more than likely do
## not support localization.
##
+## Additional Notes:
+## Localization can be done and is done before passing the phrases
+## to the output.
+## This might conflict with special characters, e.g. German Umlaute or
+## chinese characters. Do not use such characters in this case.
+## If this failed, consider that the sequence and folder names
+## are also passed to the output and would fail the same way.
+##
#
#
##
@@ -84,7 +92,7 @@ my %SeqStat; # keys are symbs, values
## title yes any scalar This is what the user sees to identify
## the field. Passed through &mt().
## long_title yes any scalar Used as graph heading and in excel
-## output. NOT translated
+## output. Passed through &mt().
## align no (left|right|center) HTML cell contents alignment
## color yes html color HTML cell background color
## used to visually group statistics
@@ -174,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',
},
@@ -274,7 +282,7 @@ my @Fields = (
sortable => 'yes',
graphable => 'yes',
long_title => 'Degree of Difficulty'.
- '[ 1 - ((#YES+#yes) / Tries) ]',
+ ' ~[ 1 - ((#YES+#yes) / Tries) ~]',
selectable => 'yes',
defaultselected => 'yes',
},
@@ -430,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',
},
@@ -485,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',
},
@@ -578,14 +586,14 @@ sub parse_field_selection {
sub field_selection_input {
my $Str = '\n";
}
@@ -610,7 +618,6 @@ sub CreateInterface {
&parse_field_selection();
#
my $Str = '';
- $Str .= '
');
- $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);
@@ -817,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);
@@ -921,14 +926,16 @@ sub statistics_table_header {
next if ($options =~ /no $field->{'name'}/);
next if ($field->{'selected'} ne 'yes');
$header_row .= '
';
+ my $Str .= &Apache::loncommon::start_data_table_header_row();
foreach my $field (@SeqFields) {
# next if ($field->{'selected'} ne 'yes');
$Str .= '