--- loncom/interface/statistics/lonproblemstatistics.pm 2003/08/27 21:33:33 1.56
+++ loncom/interface/statistics/lonproblemstatistics.pm 2003/12/08 19:37:44 1.62
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.56 2003/08/27 21:33:33 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.62 2003/12/08 19:37:44 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#',
@@ -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,54 +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 .= '