[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemanalysis.pm lonstathelpers.pm lonsubmissiontimeanalysis.pm

matthew lon-capa-cvs@mail.lon-capa.org
Tue, 19 Apr 2005 13:59:35 -0000


matthew		Tue Apr 19 09:59:35 2005 EDT

  Modified files:              
    /loncom/interface/statistics	lonproblemanalysis.pm 
                                	lonstathelpers.pm 
                                	lonsubmissiontimeanalysis.pm 
  Log:
  Bug 2989: Need more submit buttons on problem selection pages.  Problem 
  analysis and submission time analysis now have submit buttons after each 
  sequence/folder.
  
  
Index: loncom/interface/statistics/lonproblemanalysis.pm
diff -u loncom/interface/statistics/lonproblemanalysis.pm:1.120 loncom/interface/statistics/lonproblemanalysis.pm:1.121
--- loncom/interface/statistics/lonproblemanalysis.pm:1.120	Thu Apr  7 02:56:24 2005
+++ loncom/interface/statistics/lonproblemanalysis.pm	Tue Apr 19 09:59:34 2005
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonproblemanalysis.pm,v 1.120 2005/04/07 06:56:24 albertel Exp $
+# $Id: lonproblemanalysis.pm,v 1.121 2005/04/19 13:59:34 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -159,11 +159,14 @@
         }
         $r->print('<hr />');
     } else {
-        $r->print('<input type="submit" name="ProblemAnalysis" value="'.
-                  &mt('Analyze Problem').'" />');
+        my $submit_button = '<input type="submit" '.
+            'name="ProblemAnalysis" value="'.
+            &mt('Analyze Problem').'" />';
+        $r->print($submit_button);
         $r->print('&nbsp;'x5);
         $r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>');
-        $r->print(&Apache::lonstathelpers::problem_selector($problem_types));
+        $r->print(&Apache::lonstathelpers::problem_selector($problem_types,
+                                                            $submit_button));
     }
 }
 
Index: loncom/interface/statistics/lonstathelpers.pm
diff -u loncom/interface/statistics/lonstathelpers.pm:1.49 loncom/interface/statistics/lonstathelpers.pm:1.50
--- loncom/interface/statistics/lonstathelpers.pm:1.49	Fri Apr  8 09:35:50 2005
+++ loncom/interface/statistics/lonstathelpers.pm	Tue Apr 19 09:59:35 2005
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstathelpers.pm,v 1.49 2005/04/08 13:35:50 albertel Exp $
+# $Id: lonstathelpers.pm,v 1.50 2005/04/19 13:59:35 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -132,7 +132,7 @@
 ####################################################
 ####################################################
 sub problem_selector {
-    my ($AcceptedResponseTypes) = @_;
+    my ($AcceptedResponseTypes,$sequence_addendum) = @_;
     my $Str;
     $Str = "\n<table>\n";
     my $rb_count =0;
@@ -179,8 +179,15 @@
             }
         }
         if ($seq_str ne '') {
-            $Str .= '<tr><td>&nbsp</td><td colspan="2"><b>'.$seq->compTitle.'</b></td>'.
+            $Str .= '<tr><td>&nbsp</td>'.
+                '<td colspan="2"><b>'.$seq->compTitle.'</b></td>'.
                 "</tr>\n".$seq_str;
+            if (defined($sequence_addendum)) {
+                $Str .= '<tr>'.
+                    ('<td>&nbsp</td>'x2).
+                    '<td align="right">'.$sequence_addendum.'</td>'.
+                    "</tr>\n";
+            }
         }
     }
     $Str .= "</table>\n";
Index: loncom/interface/statistics/lonsubmissiontimeanalysis.pm
diff -u loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.23 loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.24
--- loncom/interface/statistics/lonsubmissiontimeanalysis.pm:1.23	Thu Apr  7 02:56:24 2005
+++ loncom/interface/statistics/lonsubmissiontimeanalysis.pm	Tue Apr 19 09:59:35 2005
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonsubmissiontimeanalysis.pm,v 1.23 2005/04/07 06:56:24 albertel Exp $
+# $Id: lonsubmissiontimeanalysis.pm,v 1.24 2005/04/19 13:59:35 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -80,11 +80,12 @@
     #
     if (! exists($env{'form.problemchoice'}) ||
         exists($env{'form.SelectAnother'})) {
-        $r->print('<input type="submit" name="" value="'.
-                  &mt('Graph Problem Submission Times').'" />');
-        $r->print('&nbsp;'x5);
+        my $submit_button = '<input type="submit" name="" value="'.
+            &mt('Graph Problem Submission Times').'" />';
+        $r->print($submit_button.'&nbsp;'x5);
         $r->print('<h3>'.&mt('Please select a problem to analyze').'</h3>');
-        $r->print(&Apache::lonstathelpers::problem_selector('.'));
+        $r->print(&Apache::lonstathelpers::problem_selector('.',
+                                                            $submit_button));
     } else {
         foreach my $button (@SubmitButtons) {
             $r->print('<input type="submit" name="'.$button->{'name'}.'" '.