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

www lon-capa-cvs@mail.lon-capa.org
Mon, 07 Aug 2006 16:23:06 -0000


www		Mon Aug  7 12:23:06 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  Declutter display for people who don't care about types (which will be most)
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.325 loncom/interface/lonparmset.pm:1.326
--- loncom/interface/lonparmset.pm:1.325	Mon Jul 17 13:23:24 2006
+++ loncom/interface/lonparmset.pm	Mon Aug  7 12:23:04 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.325 2006/07/17 17:23:24 www Exp $
+# $Id: lonparmset.pm,v 1.326 2006/08/07 16:23:04 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3408,6 +3408,8 @@
 				    (&mt('all'),10,20,50,100,1000,10000));
 
     $r->print('<nobr>'.&mt('[_1] Records',$countselect).'</nobr>'.
+              '<label>'.&Apache::lonhtmlcommon::checkbox('includetypes',$env{'form.includetypes'},'1').
+	      ' '.&mt('Include parameter types').'</label>'.
 	      '<input type="submit" value="'.&mt('Display').'" />');
 
     my $courseopt=&Apache::lonnet::get_courseresdata($env{'course.'.$env{'request.course.id'}.'.num'},
@@ -3420,6 +3422,7 @@
     foreach my $id (sort { $parmlog{$b}{'exe_time'}<=>$parmlog{$a}{'exe_time'} } (keys(%parmlog))) {
         my @changes=keys(%{$parmlog{$id}{'logentry'}});
 	my $count=$#changes+1;
+	if (!$env{'form.includetypes'}) { $count=$count/2; }
 	my $time =
 	    &Apache::lonlocal::locallocaltime($parmlog{$id}{'exe_time'});
 	my $plainname = 
@@ -3449,7 +3452,10 @@
             my $value=$parmlog{$id}{'logentry'}->{$changed};
             my ($realm,$section,$parmname,$part,$typeflag,$what,$middle,$uname,$udom,$issection,$realmdescription)=
 		&components($changed,$parmlog{$id}{'uname'},$parmlog{$id}{'udom'});
-	    if ($typeflag) { $istype{$parmname}=$value; }
+	    if ($typeflag) {
+		if (!$env{'form.includetypes'}) { next; } 
+		$istype{$parmname}=$value; 
+	    }
 	    if ($makenewrow) { $r->print($row_start); } else { $makenewrow=1; }
 	    $r->print('<td>'.$realm.'</td><td>'.$section.'</td><td>'.
 		      &standard_parameter_names($parmname).'</td><td>'.