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

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 02 Jun 2006 22:12:50 -0000


albertel		Fri Jun  2 18:12:50 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - style
  - xhtml
  - 100000 seems large change to 'all'
  - save and restore state of selector
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.310 loncom/interface/lonparmset.pm:1.311
--- loncom/interface/lonparmset.pm:1.310	Fri Jun  2 06:02:37 2006
+++ loncom/interface/lonparmset.pm	Fri Jun  2 18:12:50 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.310 2006/06/02 10:02:37 www Exp $
+# $Id: lonparmset.pm,v 1.311 2006/06/02 22:12:50 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3365,13 +3365,25 @@
     my %parmlog=&Apache::lonnet::dump('nohist_parameterlog',
 				      $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('<form action="/adm/parmset?action=settable"
+                     method="post" name"parameterlog">
+               <input type="hidden" name="action"
+                      value="parameterchangelog" />');
+    
+    my %saveable_parameters = ('show' => 'scalar',);
+    &Apache::loncommon::store_course_settings('parameter_log',
+                                              \%saveable_parameters);
+    &Apache::loncommon::restore_course_settings('parameter_log',
+                                                \%saveable_parameters);
+    if (!$env{'form.show'}) { $env{'form.show'}=10; }
+
+    my $countselect =
+	&Apache::lonmeta::selectbox('show',$env{'form.show'},undef,
+				    (&mt('all'),10,20,50,100,1000,10000));
+
     $r->print('<nobr>'.&mt('[_1] Records',$countselect).'</nobr>'.
 	      '<input type="submit" value="'.&mt('Display').'" />');
 
@@ -3460,7 +3472,8 @@
 	    $r->print(&Apache::loncommon::end_data_table_row());
 	}
 	$shown++;
-	if ($shown>=$env{'form.show'}) { last; }
+	if (!($env{'form.show'} eq &mt('all') 
+	      || $shown<=$env{'form.show'})) { last; }
     }
     $r->print(&Apache::loncommon::end_data_table());
     $r->print('</form>');