[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 06 May 2003 22:08:28 -0000


albertel		Tue May  6 18:08:28 2003 EDT

  Modified files:              
    /loncom/homework	matchresponse.pm 
  Log:
  - unpretty when zero items and editing
  
  
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.16 loncom/homework/matchresponse.pm:1.17
--- loncom/homework/matchresponse.pm:1.16	Wed Mar 26 17:59:09 2003
+++ loncom/homework/matchresponse.pm	Tue May  6 18:08:28 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Full matching style response
 #
-# $Id: matchresponse.pm,v 1.16 2003/03/26 22:59:09 albertel Exp $
+# $Id: matchresponse.pm,v 1.17 2003/05/06 22:08:28 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -113,6 +113,7 @@
     my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
     my $result;
 
+    if ($target eq 'edit') { $result=&Apache::edit::end_table(); }
     if (!defined(@{ $Apache::response::itemgroup{'names'} })) { return; }
     my @names=@{ $Apache::response::itemgroup{'names'} };
     my $randomize =&Apache::lonxml::get_param('randomize',$parstack,$safeeval);
@@ -154,7 +155,7 @@
 	}
 	$table.=' \end{tabular} \\\\ ';
 	$Apache::matchresponse::itemtable{'display'}=$table;
-    } elsif ($target eq 'edit') { $result=&Apache::edit::end_table(); }
+    }
     return $result;
 }