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

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 12 May 2003 22:07:18 -0000


matthew		Mon May 12 18:07:18 2003 EDT

  Modified files:              
    /loncom/interface	lonstatistics.pm 
    /loncom/interface/statistics	lonstudentassessment.pm 
                                	lonproblemstatistics.pm 
  Log:
  lonstatistics.pm:  Now checks the status of the student before loading them
     in to the @Students array.  The student status selection box is no longer
     a part of the main statistics interface (top line of the display).
  lonproblemstatistics.pm and lonstudentassessment.pm have been modified to
     include the student status selector in their interface.
  
  
Index: loncom/interface/lonstatistics.pm
diff -u loncom/interface/lonstatistics.pm:1.67 loncom/interface/lonstatistics.pm:1.68
--- loncom/interface/lonstatistics.pm:1.67	Mon Apr 21 11:12:37 2003
+++ loncom/interface/lonstatistics.pm	Mon May 12 18:07:17 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstatistics.pm,v 1.67 2003/04/21 15:12:37 matthew Exp $
+# $Id: lonstatistics.pm,v 1.68 2003/05/12 22:07:17 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -240,6 +240,10 @@
     }
 
     #
+    # get the status requested
+    my $requested_status = 'Active';
+    $requested_status = $ENV{'form.Status'} if (exists($ENV{'form.Status'}));
+    #
     # Process the classlist
     while (my ($student,$student_data) = each (%$classlist)) {
         my $studenthash = ();
@@ -266,7 +270,11 @@
         #
         # Only put in the list those students we are interested in
         foreach my $sect (@SelectedSections) {
-            if (($sect eq 'all') || ($section eq $sect)) {
+            if ( (($sect eq 'all') || 
+                  ($section eq $sect)) &&
+                 (($studenthash->{'status'} eq $requested_status) || 
+                  ($requested_status eq 'Any')) 
+                 ){
                 push (@Students,$studenthash);
                 last;
             }
@@ -834,7 +842,6 @@
     $Str .= '<td></td>'."\n";
     $Str .= '<td></td>'."\n";
     $Str .= '<td align="center"><b>Select a Report</b></td>'."\n";
-    $Str .= '<td align="center"><b>Student Status</b></td></tr>'."\n";
     $Str .= '<tr>'."\n";
     #
     $Str .= '<td align="center">'.
@@ -854,10 +861,6 @@
         $Str .= '>'.$reports->{$_}.'</option>'."\n";
     }
     $Str .= '</select></td>'."\n";
-    #
-    $Str .= '<td align="center">';
-    $Str .= &Apache::lonhtmlcommon::StatusOptions($status, 'Statistics');
-    $Str .= '</td>'."\n";
     #
     $Str .= '</tr></tbody></table>'."\n";
     $Str .= '<hr>'."\n";
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.45 loncom/interface/statistics/lonstudentassessment.pm:1.46
--- loncom/interface/statistics/lonstudentassessment.pm:1.45	Tue Apr 29 15:46:24 2003
+++ loncom/interface/statistics/lonstudentassessment.pm	Mon May 12 18:07:17 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentassessment.pm,v 1.45 2003/04/29 19:46:24 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.46 2003/05/12 22:07:17 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -224,6 +224,7 @@
     $Str .= '<tr>';
     $Str .= '<td align="center"><b>Sections</b></td>';
     $Str .= '<td align="center"><b>Student Data</b></td>';
+    $Str .= '<td align="center"><b>Enrollment Status</b></td>';
     $Str .= '<td align="center"><b>Sequences and Folders</b></td>';
     $Str .= '<td align="center"><b>Output Format</b></td>';
     $Str .= '</tr>'."\n";
@@ -241,6 +242,8 @@
     };
     $Str .= &Apache::lonstatistics::StudentDataSelect('StudentData','multiple',
                                                       5,undef);
+    $Str .= '</td><td>'."\n";
+    $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $Str .= '</td><td>'."\n";
     $Str .= &Apache::lonstatistics::MapSelect('Maps','multiple,all',5,
                                               $only_seq_with_assessments);
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.49 loncom/interface/statistics/lonproblemstatistics.pm:1.50
--- loncom/interface/statistics/lonproblemstatistics.pm:1.49	Tue Apr  1 12:00:24 2003
+++ loncom/interface/statistics/lonproblemstatistics.pm	Mon May 12 18:07:17 2003
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemstatistics.pm,v 1.49 2003/04/01 17:00:24 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.50 2003/05/12 22:07:17 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -177,12 +177,15 @@
     $Str .= '<table cellspacing="5">'."\n";
     $Str .= '<tr>';
     $Str .= '<td align="center"><b>Sections</b></td>';
+    $Str .= '<td align="center"><b>Enrollment Status</b></td>';
     $Str .= '<td align="center"><b>Sequences and Folders</b></td>';
     $Str .= '<td align="center"><b>Output</b></td>';
     $Str .= '</tr>'."\n";
     #
     $Str .= '<tr><td align="center">'."\n";
     $Str .= &Apache::lonstatistics::SectionSelect('Section','multiple',5);
+    $Str .= '</td><td align="center">';
+    $Str .= &Apache::lonhtmlcommon::StatusOptions(undef,undef,5);
     $Str .= '</td><td align="center">';
     #
     my $only_seq_with_assessments = sub {