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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 17 Oct 2002 14:40:05 -0000


sakharuk		Thu Oct 17 10:40:05 2002 EDT

  Modified files:              
    /loncom/homework	optionresponse.pm 
  Log:
  For the exam 1. correctly adjust the size of bubbles to the text width;
  2. use correct enumeration through the environment variable;
  
  
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.51 loncom/homework/optionresponse.pm:1.52
--- loncom/homework/optionresponse.pm:1.51	Thu Oct 17 10:30:40 2002
+++ loncom/homework/optionresponse.pm	Thu Oct 17 10:40:05 2002
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.51 2002/10/17 14:30:40 sakharuk Exp $
+# $Id: optionresponse.pm,v 1.52 2002/10/17 14:40:05 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -426,7 +426,7 @@
     my $current_length = 0;
     for (my $ind=0;$ind<=$number_of_bubbles;$ind++) {
 	$current_length += (length($opt[$ind])+length($alphabet[$ind])+2)*2;
-	if ($current_length<80 and $ind!=$number_of_bubbles) {
+	if ($current_length<0.9*$ENV{'form.textwidth'} and $ind!=$number_of_bubbles) {
 	    $line.='\hskip -1 mm {\small \textbf{'.$alphabet[$ind].'}}$\bigcirc$\hskip -1 mm & \hskip -3 mm {\small '.$opt[$ind].'} & ';
 	    $head.='lr';
 	} else {