[LON-CAPA-cvs] cvs: loncom /interface lonparmset.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 02 Jun 2006 06:48:56 -0000


www		Fri Jun  2 02:48:56 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Limit display length of parameter log
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.308 loncom/interface/lonparmset.pm:1.309
--- loncom/interface/lonparmset.pm:1.308	Tue May 30 08:46:09 2006
+++ loncom/interface/lonparmset.pm	Fri Jun  2 02:48:54 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.308 2006/05/30 12:46:09 www Exp $
+# $Id: lonparmset.pm,v 1.309 2006/06/02 06:48:54 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3335,6 +3335,14 @@
 						   'weight' => 'Weight',
 						   'date_start' => 'Starting Date',
 						   'date_end' => 'Ending Date',
+                                                   'interval' => 'Time Interval Length',
+                                                   'tol' => 'Numerical Tolerance',
+                                                   'sig' => 'Significant Digits',
+                                                   'contentopen' => 'Content Opening Date',
+                                                   'contentclose' => 'Content Closing Date',
+                                                   'discussend' => 'End of Discussion Time',
+                                                   'discusshide' => 'Discussion Hidden',
+                                                   'problemstatus' => 'Problem Status Visible',
 						   'int_pos' => 'Positive Integer',
 						   'int_zero_pos' => 'Positive Integer or Zero',
 						   'hinttries' => 'Number of Tries till Hints appear');
@@ -3345,6 +3353,11 @@
     }
 }
 
+#
+# Parameter Change Log
+#
+
+
 sub parm_change_log {
     my ($r)=@_;
     &startpage($r);
@@ -3352,6 +3365,14 @@
 				      $env{'course.'.$env{'request.course.id'}.'.domain'},
 				      $env{'course.'.$env{'request.course.id'}.'.num'});
     if ((keys(%parmlog))[0]=~/^error\:/) { undef(%parmlog); }
+    $r->print('<form method="post"><input type="hidden" name="action" value="parameterchangelog" />');
+    unless ($env{'form.show'}) { $env{'form.show'}=10; }
+    my $countselect = &Apache::lonmeta::selectbox('show',
+                                                  $env{'form.show'},
+                                                  undef,
+                                                  (10,20,50,100,1000,10000,100000));
+    $r->print('<nobr>'.&mt('[_1] Records',$countselect).'</nobr>'.
+	      '<input type="submit" value="'.&mt('Display').'" />');
 
     my $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'},
 						     $env{'course.'.$env{'request.course.id'}.'.domain'});
@@ -3359,6 +3380,7 @@
 	      '<th>'.&mt('Time').'</th><th>'.&mt('User').'</th><th>'.&mt('Extent').'</th><th>'.&mt('Users').'</th><th>'.
 	      &mt('Parameter').'</th><th>'.&mt('Part').'</th><th>'.&mt('New Value').'</th><th>'.&mt('Announce').'</th>'.
 	      &Apache::loncommon::end_data_table_header_row());
+    my $shown=0;
     foreach my $id (sort { $parmlog{$b}{'exe_time'}<=>$parmlog{$a}{'exe_time'} } (keys(%parmlog))) {
         my @changes=keys(%{$parmlog{$id}{'logentry'}});
 	my $count=$#changes+1;
@@ -3436,8 +3458,11 @@
 	    }
 	    $r->print(&Apache::loncommon::end_data_table_row());
 	}
+	$shown++;
+	if ($shown>=$env{'form.show'}) { last; }
     }
     $r->print(&Apache::loncommon::end_data_table());
+    $r->print('</form>');
     $r->print(&Apache::loncommon::end_page());
 }