[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Fri, 13 Aug 2004 15:54:06 -0000
sakharuk Fri Aug 13 11:54:06 2004 EDT
Modified files:
/loncom/homework structuretags.pm
Log:
Bug 2336 (cannot print when responses are in tables) is fixed. The source of this bug is conflict between 'minipage' and 'table' environment in previous version of this module.
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.263 loncom/homework/structuretags.pm:1.264
--- loncom/homework/structuretags.pm:1.263 Tue Aug 10 14:25:53 2004
+++ loncom/homework/structuretags.pm Fri Aug 13 11:54:06 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.263 2004/08/10 18:25:53 sakharuk Exp $
+# $Id: structuretags.pm,v 1.264 2004/08/13 15:54:06 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1085,7 +1085,11 @@
} else {
if ($target eq 'tex') {
if (not $ENV{'form.problem_split'}=~/yes/) {
- $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ if ($$tagstack[-2] eq 'td') {
+ $result.='\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ } else {
+ $result.='\noindent \end{minipage}\vskip 0 mm \noindent \begin{minipage}{\textwidth}\noindent';
+ }
}
my $weight = &Apache::lonnet::EXT("resource.$id.weight");
my $allkeys=&Apache::lonnet::metadata($ENV{'request.uri'},'packages');
@@ -1145,6 +1149,7 @@
$gradestatus='';
}
$result=$gradestatus;
+ if ($$tagstack[-2] eq 'td') {$result.='\end{minipage}';}
} elsif ($target eq 'edit') {
$result=&Apache::edit::end_table();
}