--- loncom/interface/statistics/lonproblemstatistics.pm 2003/10/28 20:08:23 1.55.2.1
+++ loncom/interface/statistics/lonproblemstatistics.pm 2003/12/09 21:14:23 1.63
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.55.2.1 2003/10/28 20:08:23 albertel Exp $
+# $Id: lonproblemstatistics.pm,v 1.63 2003/12/09 21:14:23 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -51,11 +51,20 @@ package Apache::lonproblemstatistics;
use strict;
use Apache::lonnet();
+use Apache::loncommon();
use Apache::lonhtmlcommon;
use Apache::loncoursedata;
use Apache::lonstatistics;
+use Apache::lonlocal;
use Spreadsheet::WriteExcel;
+##
+## Localization notes:
+##
+## in @Fields[0]->{'long_title'} is placed in Excel files and is used as the
+## header for plots created with Graph.pm, both of which more than likely do
+## not support localization.
+##
my @Fields = (
{ name => 'problem_num',
title => 'P#',
@@ -138,7 +147,7 @@ my @Fields = (
title => '#YES',
align => 'right',
color => '#FFDDDD',
- format => '%d',
+ format => '%4.1f',# format => '%d',
sortable => 'yes',
graphable => 'yes',
long_title => 'Number of Students able to Solve' },
@@ -146,7 +155,7 @@ my @Fields = (
title => '#yes',
align => 'right',
color => '#FFDDDD',
- format => '%d',
+ format => '%4.1f',# format => '%d',
sortable => 'yes',
graphable => 'yes',
long_title => 'Number of Students given Override' },
@@ -174,64 +183,6 @@ select sections, maps, and output.
###############################################
###############################################
-sub CreateInterface {
- my $Str = '';
- $Str .= '
'."\n";
- $Str .= '';
- $Str .= ' 'x5;
- $Str .= '';
- $Str .= ' 'x5;
- return $Str;
-}
-
-#######################################################
-#######################################################
-
-=pod
-
-=item &CreateAndParseOutputSelector()
-
-Construct a selection list of options for output and parse output selections.
-The current output selected is indicated by the values of the two package
-variables $output_mode and $show. @OutputOptions holds the descriptions of
-the output options and the values for $output_mode and $show.
-
-Based on code from lonstudentassessment.pm.
-
-=cut
-
-#######################################################
-#######################################################
-my $output_mode;
-my $show;
-
my @OutputOptions =
(
{ name => 'problem statistics grouped by sequence',
@@ -255,92 +206,48 @@ my @OutputOptions =
},
);
-sub OutputDescriptions {
- my $Str = '';
- $Str .= "
Output Modes
\n";
- $Str .= "
\n";
- foreach my $outputmode (@OutputOptions) {
- $Str .="
".$outputmode->{'name'}."
\n";
- $Str .="
".$outputmode->{'description'}."
\n";
- }
- $Str .= "
\n";
- return $Str;
-}
-
-sub CreateAndParseOutputSelector {
+sub CreateInterface {
my $Str = '';
- my $elementname = 'statsoutputmode';
- #
- # Format for output options is 'mode, restrictions';
- my $selected = 'HTML problem statistics grouped';
- if (exists($ENV{'form.'.$elementname})) {
- if (ref($ENV{'form.'.$elementname} eq 'ARRAY')) {
- $selected = $ENV{'form.'.$elementname}->[0];
- } else {
- $selected = $ENV{'form.'.$elementname};
- }
- }
+ $Str .= '
'."\n";
+ $Str .= '
';
+ $Str .= '
'.&mt('Sections').'
';
+ $Str .= '
'.&mt('Enrollment Status').'
';
+ $Str .= '
'.&mt('Sequences and Folders').'
';
+ $Str .= '
'.&mt('Output').'
';
+ $Str .= '
'."\n";
#
- # Set package variables describing output mode
- $output_mode = 'html';
- $show = 'all';
- foreach my $option (@OutputOptions) {
- next if ($option->{'value'} ne $selected);
- $output_mode = $option->{'mode'};
- $show = $option->{'show'};
- }
+ $Str .= '