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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 14 Jul 2005 04:17:45 -0000


albertel		Thu Jul 14 00:17:45 2005 EDT

  Modified files:              
    /loncom/homework	randomlabel.pm 
  Log:
  - the 3.5 offset should only be used when dealing with text
  
  
Index: loncom/homework/randomlabel.pm
diff -u loncom/homework/randomlabel.pm:1.79 loncom/homework/randomlabel.pm:1.80
--- loncom/homework/randomlabel.pm:1.79	Thu Jul 14 00:08:55 2005
+++ loncom/homework/randomlabel.pm	Thu Jul 14 00:17:44 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # random labelling tool
 #
-# $Id: randomlabel.pm,v 1.79 2005/07/14 04:08:55 albertel Exp $
+# $Id: randomlabel.pm,v 1.80 2005/07/14 04:17:44 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -451,8 +451,11 @@
 	for(my $i=0;$i <= $#Apache::randomlabel::label_arr; $i++) {
 	    my $label = "$Apache::randomlabel::label_arr[ $idx_arr[$i] ]";
 	    my $x = $Apache::randomlabel::xcoord[$i];
-	    # FIXME the 3.5 here is the 'height' of the letter in TeX
-	    my $y = $Apache::randomlabel::ycoord[$i]-3.5;
+	    my $y = $Apache::randomlabel::ycoord[$i];
+	    if ( $type eq 'text' ) {
+		# FIXME the 3.5 here is the 'height' of the letter in TeX
+		$y=$y-3.5;
+	    }
 	    &Apache::lonxml::debug("initially: x= $x y= $y");
 	    my $value = $Apache::randomlabel::value[$i];
 	    #x latex coordinate