--- loncom/homework/randomlabel.pm 2005/07/14 04:08:55 1.79 +++ loncom/homework/randomlabel.pm 2005/12/01 18:46:31 1.81 @@ -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.81 2005/12/01 18:46:31 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -451,8 +451,11 @@ sub end_labelgroup { 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 @@ -548,7 +551,7 @@ sub start_label { &Apache::lonxml::startredirection; } elsif ($target eq 'edit') { $result.=&Apache::edit::tag_start($target,$token,"$type Label"); - my $text=&Apache::lonxml::get_all_text("/label",$parser); + my $text=&Apache::lonxml::get_all_text("/label",$parser,$style); if ($type eq 'image') { $result.=&Apache::edit::end_row(). &Apache::edit::start_spanning_row();