--- loncom/interface/statistics/lonstudentassessment.pm 2003/06/11 16:19:39 1.58
+++ loncom/interface/statistics/lonstudentassessment.pm 2004/01/27 16:58:05 1.81
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.58 2003/06/11 16:19:39 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.81 2004/01/27 16:58:05 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -52,9 +52,12 @@ package Apache::lonstudentassessment;
use strict;
use Apache::lonstatistics;
use Apache::lonhtmlcommon;
+use Apache::loncommon();
use Apache::loncoursedata;
use Apache::lonnet; # for logging porpoises
+use Apache::lonlocal;
use Spreadsheet::WriteExcel;
+use Spreadsheet::WriteExcel::Utility();
#######################################################
#######################################################
@@ -138,8 +141,32 @@ Inputs:
#######################################################
sub BuildStudentAssessmentPage {
my ($r,$c)=@_;
+ #
undef($Statistics);
+ undef($show_links);
+ undef($output_mode);
+ undef($data);
+ undef($base);
+ undef($datadescription);
+ undef($single_student_mode);
+ #
+ my %Saveable_Parameters = ('Status' => 'scalar',
+ 'chartoutputmode' => 'scalar',
+ 'chartoutputdata' => 'scalar',
+ 'Section' => 'array',
+ 'StudentData' => 'array',
+ 'Maps' => 'array');
+ &Apache::loncommon::store_course_settings('chart',\%Saveable_Parameters);
+ &Apache::loncommon::restore_course_settings('chart',\%Saveable_Parameters);
+ #
+ &Apache::lonstatistics::PrepareClasslist();
+ #
+ $single_student_mode = 0;
$single_student_mode = 1 if ($ENV{'form.SelectedStudent'});
+ if ($ENV{'form.selectstudent'}) {
+ &Apache::lonstatistics::DisplayClasslist($r);
+ return;
+ }
#
# Print out the HTML headers for the interface
# This also parses the output mode selector
@@ -187,6 +214,9 @@ sub BuildStudentAssessmentPage {
# are immediately reflected in the chart.
&Apache::lonnet::clear_EXT_cache_status();
#
+ # Clean out loncoursedata's package data, just to be safe.
+ &Apache::loncoursedata::clear_internal_caches();
+ #
# Call the initialize routine selected above
$initialize->($r);
foreach my $student (@Students) {
@@ -289,14 +319,14 @@ sub CreateInterface {
# $Str .= &CreateLegend();
$Str .= '
'."\n";
$Str .= '';
- $Str .= 'Sections | ';
- $Str .= 'Student Data | ';
- $Str .= 'Enrollment Status | ';
- $Str .= 'Sequences and Folders | ';
- $Str .= 'Output Format'.
+ $Str .= ' | '.&mt('Sections').' | ';
+ $Str .= ''.&mt('Student Data').' | ';
+ $Str .= ''.&mt('Enrollment Status').' | ';
+ $Str .= ''.&mt('Sequences and Folders').' | ';
+ $Str .= ''.&mt('Output Format').''.
&Apache::loncommon::help_open_topic("Chart_Output_Formats").
' | ';
- $Str .= 'Output Data'.
+ $Str .= ' | '.&mt('Output Data').''.
&Apache::loncommon::help_open_topic("Chart_Output_Data").
' | ';
$Str .= '
'."\n";
@@ -325,8 +355,16 @@ sub CreateInterface {
$Str .= &CreateAndParseOutputDataSelector();
$Str .= ''."\n";
$Str .= '
'."\n";
- $Str .= '';
- $Str .= ' 'x8;
+ $Str .= '';
+ $Str .= ' 'x5;
+ $Str .= '';
+ $Str .= ' 'x5;
+ $Str .= '';
+ $Str .= ' 'x5;
+ $Str .= '
';
return $Str;
}
@@ -397,6 +435,8 @@ sub OutputDescriptions {
sub CreateAndParseOutputSelector {
my $Str = '';
my $elementname = 'chartoutputmode';
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+ [$elementname]);
#
# Format for output options is 'mode, restrictions';
my $selected = 'html, without links';
@@ -423,7 +463,7 @@ sub CreateAndParseOutputSelector {
foreach my $option (@OutputOptions) {
$Str .= "\n".'