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

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


sakharuk		Fri Feb 13 16:01:11 2004 EDT

  Modified files:              
    /loncom/homework	optionresponse.pm 
  Log:
  I've found my own error (actually not error but I did not consider yesterday printing for the selected students) and fixed it.
  
  
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.99 loncom/homework/optionresponse.pm:1.100
--- loncom/homework/optionresponse.pm:1.99	Thu Feb 12 10:50:01 2004
+++ loncom/homework/optionresponse.pm	Fri Feb 13 16:01:11 2004
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.99 2004/02/12 15:50:01 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.100 2004/02/13 21:01:11 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -485,8 +485,14 @@
     my ($result,$head,$line) =('','','');
     my $number_of_bubbles = $#opt + 1;
     my $current_length = 0;
-    $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;
+    }
     for (my $ind=0;$ind<=$number_of_bubbles;$ind++) {
 	my $leftmargin;
 	if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;}