--- loncom/interface/statistics/lonproblemstatistics.pm 2011/01/17 00:19:41 1.119
+++ loncom/interface/statistics/lonproblemstatistics.pm 2023/09/08 00:07:30 1.122.2.4.2.1
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.119 2011/01/17 00:19:41 www Exp $
+# $Id: lonproblemstatistics.pm,v 1.122.2.4.2.1 2023/09/08 00:07:30 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -52,7 +52,6 @@ package Apache::lonproblemstatistics;
use strict;
use Apache::lonnet;
use Apache::loncommon();
-use Apache::lonquickgrades();
use Apache::lonhtmlcommon;
use Apache::loncoursedata;
use Apache::lonstatistics;
@@ -74,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.
+##
#
#
##
@@ -85,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
@@ -175,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',
},
@@ -275,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',
},
@@ -431,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',
},
@@ -486,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',
},
@@ -579,14 +586,14 @@ sub parse_field_selection {
sub field_selection_input {
my $Str = '\n";
}
@@ -611,7 +618,6 @@ sub CreateInterface {
&parse_field_selection();
#
my $Str = '';
- $Str .= '
';
- #
- $Str .= '';
$Str .= '';
$Str .= (' 'x10);
@@ -705,7 +704,6 @@ sub BuildProblemStatisticsPage {
# Finally let the user know we are here
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Overall Problem Statistics',
'Statistics_Overall_Key'));
- &Apache::lonquickgrades::startGradeScreen($r,'statistics');
my $interface = &CreateInterface($r);
$r->print($interface);
@@ -747,29 +745,30 @@ sub BuildProblemStatisticsPage {
return;
}
if (exists($env{'form.Excel'})) {
- $r->print('
".&mt('Compiled on [_1]',
- &Apache::lonlocal::locallocaltime(time))."
";
+ $Str .= "
".&mt('Compiled on [_1]',
+ &Apache::lonlocal::locallocaltime(time))."
";
return $Str;
}
@@ -903,7 +899,7 @@ sub statistics_html_table_data {
foreach my $field (@Fields) {
next if ($options =~ /no $field->{'name'}/);
next if ($field->{'selected'} ne 'yes');
- $row .= '
{'color'}.'"';
if (exists($field->{'align'})) {
$row .= ' align="'.$field->{'align'}.'"';
}
@@ -931,14 +927,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 .= '