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

sakharuk lon-capa-cvs@mail.lon-capa.org
Fri, 13 Feb 2004 21:05:34 -0000


sakharuk		Fri Feb 13 16:05:34 2004 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  The same log info as for optionresponce.pm
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.129 loncom/homework/caparesponse/caparesponse.pm:1.130
--- loncom/homework/caparesponse/caparesponse.pm:1.129	Fri Feb 13 10:09:52 2004
+++ loncom/homework/caparesponse/caparesponse.pm	Fri Feb 13 16:05:34 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.129 2004/02/13 15:09:52 www Exp $
+# $Id: caparesponse.pm,v 1.130 2004/02/13 21:05:34 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -392,8 +392,14 @@
 	if ($cell_width_real>$cell_width) {$cell_width=$cell_width_real;}
     }
     $cell_width+=8;
-    $ENV{'form.textwidth'}=~/(\d+)/;
-    my $textwidth=$1;
+    my $textwidth;
+    if ($ENV{'form.textwidth'} ne '') {
+	$ENV{'form.textwidth'}=~/(\d+)/;
+	$textwidth=$1;
+    } else {
+	$ENV{'textwidth'}=~/(\d+)/;
+	$textwidth=$1;
+    }
     my $bubbles_per_line=int($textwidth/$cell_width);
     my $number_of_tables = int($number_of_bubbles/$bubbles_per_line);
     my @table_range = ();