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

albertel lon-capa-cvs@mail.lon-capa.org
Wed, 09 Aug 2006 21:11:35 -0000


albertel		Wed Aug  9 17:11:35 2006 EDT

  Modified files:              
    /loncom/interface	lonparmset.pm 
  Log:
  - rowspan="0.5" doesn't work well
  - type do have to end in .type at a minimum
  
  
Index: loncom/interface/lonparmset.pm
diff -u loncom/interface/lonparmset.pm:1.330 loncom/interface/lonparmset.pm:1.331
--- loncom/interface/lonparmset.pm:1.330	Wed Aug  9 16:47:32 2006
+++ loncom/interface/lonparmset.pm	Wed Aug  9 17:11:34 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to set parameters for assessments
 #
-# $Id: lonparmset.pm,v 1.330 2006/08/09 20:47:32 albertel Exp $
+# $Id: lonparmset.pm,v 1.331 2006/08/09 21:11:34 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3426,7 +3426,8 @@
     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; }
+	if (!$env{'form.includetypes'}) { $count=int($count/2); }
+	if ($count == 0) { $count = 1; }
 	my $time =
 	    &Apache::lonlocal::locallocaltime($parmlog{$id}{'exe_time'});
 	my $plainname = 
@@ -3454,7 +3455,8 @@
 	my %istype=();
 	foreach my $changed (reverse(sort(@changes))) {
             my $value=$parmlog{$id}{'logentry'}{$changed};
-	    my $typeflag = (!exists($parmlog{$id}{'logentry'}{$changed.'.type'}));
+	    my $typeflag = ($changed =~/\.type$/ &&
+			    !exists($parmlog{$id}{'logentry'}{$changed.'.type'}));
             my ($realm,$section,$parmname,$part,$what,$middle,$uname,$udom,$issection,$realmdescription)=
 		&components($changed,$parmlog{$id}{'uname'},$parmlog{$id}{'udom'},undef,undef,$typeflag);
 	    if ($typeflag) {