--- loncom/interface/statistics/lonproblemstatistics.pm 2004/04/01 21:35:52 1.81
+++ loncom/interface/statistics/lonproblemstatistics.pm 2004/06/16 14:21:16 1.88
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.81 2004/04/01 21:35:52 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.88 2004/06/16 14:21:16 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -55,6 +55,7 @@ use Apache::loncommon();
use Apache::lonhtmlcommon;
use Apache::loncoursedata;
use Apache::lonstatistics;
+use LONCAPA::lonmetadata();
use Apache::lonlocal;
use Spreadsheet::WriteExcel;
use Apache::lonstathelpers();
@@ -95,6 +96,10 @@ my %SeqStat; # keys are symbs, values
## statistics display?
## selected yes (yes|no) Is the column selected by default?
##
+## format no sprintf format string
+##
+## excel_format no excel format type
+## (see &Apache::loncommon::define_excel_formats
my @Fields = (
{ name => 'problem_num',
title => 'P#',
@@ -260,6 +265,50 @@ my @Fields = (
selectable => 'yes',
defaultselected => 'no',
},
+## duedate included for research purposes. Commented out most of the time.
+# { name => 'duedate',
+# title => 'Due Date',
+# align => 'left',
+# color => '#FFFFFF',
+# sortable => 'yes',
+# graphable => 'no',
+# long_title => 'Due date of resource for instructor',
+# selectable => 'no',
+# defaultselected => 'yes',
+# },
+## opendate included for research purposes. Commented out most of the time.
+# { name => 'opendate',
+# title => 'Open Date',
+# align => 'left',
+# color => '#FFFFFF',
+# sortable => 'yes',
+# graphable => 'no',
+# long_title => 'date resource became answerable',
+# selectable => 'no',
+# defaultselected => 'yes',
+# },
+## symb included for research purposes. Commented out most of the time.
+# { name => 'symb',
+# title => 'Symb',
+# align => 'left',
+# color => '#FFFFFF',
+# sortable => 'yes',
+# graphable => 'no',
+# long_title => 'Unique LON-CAPA identifier for problem',
+# selectable => 'no',
+# defaultselected => 'yes',
+# },
+## resptypes included for research purposes. Commented out most of the time.
+# { name => 'resptypes',
+# title => 'Response Types',
+# align => 'left',
+# color => '#FFFFFF',
+# sortable => 'no',
+# graphable => 'no',
+# long_title => 'Response Types used in this problem',
+# selectable => 'no',
+# defaultselected => 'yes',
+# },
);
my @SeqFields = (
@@ -461,6 +510,11 @@ sub parse_field_selection {
}
}
}
+ #
+ # Always show all the sequence statistics (for now)
+ foreach my $field (@SeqFields) {
+ $field->{'selected'} = 'yes';
+ }
return;
}
@@ -493,6 +547,7 @@ select sections, maps, and output.
###############################################
###############################################
sub CreateInterface {
+ my ($r) = @_;
#
&parse_field_selection();
#
@@ -528,19 +583,18 @@ sub CreateInterface {
$Str .= '
'.&field_selection_input();
$Str .= '
'."\n";
$Str .= ''."\n";
+ #
+ $Str .= '
'.&mt('Status: [_1]',
+ ''
+ ).
+ '
';
+ #
$Str .= '';
$Str .= ' 'x5;
$Str .= 'Plot '.&plot_dropdown().(' 'x10);
- $Str .= '';
- $Str .= ' 'x5;
- $Str .= '';
- $Str .= ' 'x5;
- $Str .= '';
- $Str .= ' 'x5;
+ #
return $Str;
}
@@ -578,13 +632,20 @@ sub BuildProblemStatisticsPage {
undef(%SeqStat);
#
# Finally let the user know we are here
- my $interface = &CreateInterface();
+ my $interface = &CreateInterface($r);
$r->print($interface);
$r->print('');
#
- if (! exists($ENV{'form.statsfirstcall'})) {
- $r->print('');
+ my @CacheButtonHTML =
+ &Apache::lonstathelpers::manage_caches($r,'Statistics','stats_status');
+ my $Str;
+ foreach my $html (@CacheButtonHTML) {
+ $Str.=$html.(' 'x5);
+ }
+ #
+ $r->print($Str);
+ if (! exists($ENV{'form.firstrun'})) {
$r->print('
'.
&mt('Press "Generate Statistics" when you are ready.').
'
'.
@@ -593,13 +654,6 @@ sub BuildProblemStatisticsPage {
' will not have this delay.').
'