[LON-CAPA-cvs] cvs: loncom /interface lonstatistics.pm /interface/statistics lonproblemanalysis.pm lonproblemstatistics.pm lonstudentassessment.pm lonsubmissiontimeanalysis.pm

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 11 Nov 2003 22:14:28 -0000


matthew		Tue Nov 11 17:14:28 2003 EDT

  Modified files:              
    /loncom/interface	lonstatistics.pm 
    /loncom/interface/statistics	lonstudentassessment.pm 
                                	lonproblemstatistics.pm 
                                	lonproblemanalysis.pm 
                                	lonsubmissiontimeanalysis.pm 
  Log:
  Use the new &Apache::loncommon::store_course_settings and 
  restore_course_settings subroutines to remember form settings.
  lonstatistics.pm was changed to not parse the student enrollment status
  form elements before calling the sub-module routines which present the
  interface.  Now each of the sub-modules (statistics/*) must call 
  &Apache::lonstatistics::PrepareClasslist(); at the right time.
  
  
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.89 loncom/interface/lonstatistics.pm:1.90
--- loncom/interface/lonstatistics.pm:1.89	Wed Oct 29 10:22:30 2003
+++ loncom/interface/lonstatistics.pm	Tue Nov 11 17:14:28 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.89 2003/10/29 15:22:30 matthew Exp $
+# $Id: lonstatistics.pm,v 1.90 2003/11/11 22:14:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -225,6 +225,7 @@
             @SelectedSections = ($ENV{'form.Section'});
         }
     }
+    &Apache::lonnet::logthis('@SelectedSections = '.join(',',@SelectedSections));
     @SelectedSections = ('all') if (! @SelectedSections);
     foreach (@SelectedSections) {
         if ($_ eq 'all') {
@@ -1158,16 +1159,16 @@
             &Apache::loncoursedata::delete_caches($ENV{'requres.course.id'});
         }
         #
-        # Set up the statistics and chart environment
-        &PrepareClasslist();
-        &PrepareCourseData($r);
-        #
         # Begin form output
         $r->print('<form name="Statistics" ');
         $r->print('method="post" action="/adm/statistics">');
         $r->rflush();
         #
         my $GoToPage = $ENV{'form.reportSelected'};
+        #
+        # Set up the statistics and chart environment
+        &PrepareCourseData($r);
+        #
         $r->print('<input type="hidden" name="reportSelected" value="'.
                   $GoToPage.'">');
         if($GoToPage eq 'activitylog') {
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.73 loncom/interface/statistics/lonstudentassessment.pm:1.74
--- loncom/interface/statistics/lonstudentassessment.pm:1.73	Wed Oct 29 11:20:14 2003
+++ loncom/interface/statistics/lonstudentassessment.pm	Tue Nov 11 17:14:28 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.73 2003/10/29 16:20:14 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.74 2003/11/11 22:14:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -138,7 +138,7 @@
 #######################################################
 sub BuildStudentAssessmentPage {
     my ($r,$c)=@_;
-
+    #
     undef($Statistics);
     undef($show_links);
     undef($output_mode);
@@ -146,7 +146,18 @@
     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'}) {
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.60 loncom/interface/statistics/lonproblemstatistics.pm:1.61
--- loncom/interface/statistics/lonproblemstatistics.pm:1.60	Fri Oct 24 09:36:16 2003
+++ loncom/interface/statistics/lonproblemstatistics.pm	Tue Nov 11 17:14:28 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.60 2003/10/24 13:36:16 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.61 2003/11/11 22:14:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -264,6 +264,18 @@
 ###############################################
 sub BuildProblemStatisticsPage {
     my ($r,$c)=@_;
+    #
+    my %Saveable_Parameters = ('Status' => 'scalar',
+                               'statsoutputmode' => 'scalar',
+                               'Section' => 'array',
+                               'StudentData' => 'array',
+                               'Maps' => 'array');
+    &Apache::loncommon::store_course_settings('statistics',
+                                              \%Saveable_Parameters);
+    &Apache::loncommon::restore_course_settings('statistics',
+                                                \%Saveable_Parameters);
+    #
+    &Apache::lonstatistics::PrepareClasslist();
     #
     my ($interface,$output_mode,$show) = &CreateInterface();
     $r->print($interface);
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.48 loncom/interface/statistics/lonproblemanalysis.pm:1.49
--- loncom/interface/statistics/lonproblemanalysis.pm:1.48	Tue Nov 11 17:07:46 2003
+++ loncom/interface/statistics/lonproblemanalysis.pm	Tue Nov 11 17:14:28 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemanalysis.pm,v 1.48 2003/11/11 22:07:46 matthew Exp $
+# $Id: lonproblemanalysis.pm,v 1.49 2003/11/11 22:14:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -72,6 +72,19 @@
 
 sub BuildProblemAnalysisPage {
     my ($r,$c)=@_;
+    #
+    my %Saveable_Parameters = ('Status' => 'scalar',
+                               'Section' => 'array',
+                               'NumPlots' => 'scalar',
+                               'AnalyzeAs' => 'scalar',
+                               'AnalyzeOver' => 'scalar',
+                               );
+    &Apache::loncommon::store_course_settings('problem_analysis',
+                                              \%Saveable_Parameters);
+    &Apache::loncommon::restore_course_settings('problem_analysis',
+                                                \%Saveable_Parameters);
+    #
+    &Apache::lonstatistics::PrepareClasslist();
     #
     $r->print('<h2>'.&mt('Option Response Problem Analysis').'</h2>');
     $r->print(&CreateInterface());
Index: loncom/interface/statistics/lonsubmissiontimeanalysis.pm
diff -u loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.3 loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.4
--- loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.3	Thu Oct 30 11:20:18 2003
+++ loncom/interface/statistics/lonsubmissiontimeanalysis.pm	Tue Nov 11 17:14:28 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonsubmissiontimeanalysis.pm,v 1.3 2003/10/30 16:20:18 matthew Exp $
+# $Id: lonsubmissiontimeanalysis.pm,v 1.4 2003/11/11 22:14:28 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -69,6 +69,16 @@
 
 sub BuildSubmissionTimePage {
     my ($r,$c)=@_;
+    #
+    my %Saveable_Parameters = ('Status' => 'scalar',
+                               'Section' => 'array');
+    &Apache::loncommon::store_course_settings('submissiontime_analysis',
+                                              \%Saveable_Parameters);
+    &Apache::loncommon::restore_course_settings('submissiontime_analysis',
+                                                \%Saveable_Parameters);
+    #
+    &Apache::lonstatistics::PrepareClasslist();    
+    #
     $r->print('<h2>'.&mt('Submission Time Plots').'</h2>');
     $r->print(&CreateInterface());
     #