--- loncom/homework/optionresponse.pm	2002/11/14 17:26:58	1.64
+++ loncom/homework/optionresponse.pm	2003/01/13 21:24:39	1.66
@@ -1,7 +1,7 @@
 # LearningOnline Network with CAPA
 # option list style responses
 #
-# $Id: optionresponse.pm,v 1.64 2002/11/14 17:26:58 albertel Exp $
+# $Id: optionresponse.pm,v 1.66 2003/01/13 21:24:39 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -319,8 +319,11 @@ sub displayfoils {
   my $part=$Apache::inputtags::part;
   my $id=$Apache::inputtags::response[-1];
   my $break;
-  if (($Apache::lonhomework::history{"resource.$part.solved"} =~ /^correct/)  || ($Apache::inputtags::status[-1] eq  'SHOW_ANSWER')) {    
-    my $temp=1; ####
+  my $solved=$Apache::lonhomework::history{"resource.$part.solved"};
+  my $status=$Apache::inputtags::status[-1];
+  if (
+      ($target ne 'tex') &&
+      (($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) ) {
     foreach $name (@whichopt) {
 	my $text=$Apache::response::foilgroup{$name.'.text'};
 	if ($text!~/^\s*$/) {
@@ -353,7 +356,6 @@ sub displayfoils {
 	  $result.=&bubbles(\@alphabet,\@opt);
         }
       }
-    $temp++;
     }
   } else {
     my $temp=1;
@@ -411,6 +413,7 @@ sub displayfoils {
 	      }
 	      if ($Apache::lonhomework::type eq 'exam') {
 		  $result.=&bubbles(\@alphabet,\@opt);
+		  $result.='\vskip 2 mm ';
 	      }
 	      $displayoptionintex=1;
 	  } else {
@@ -431,6 +434,7 @@ sub displayfoils {
 	      }
 	      if ($Apache::lonhomework::type eq 'exam') {
 		  $result.=&bubbles(\@alphabet,\@opt);
+		  $result.='\vskip 2 mm ';
 	      }
 	  }
       }
@@ -455,6 +459,7 @@ sub optionlist_correction {
     $texoptionlist =~ s/>/\$>\$/g;
     $texoptionlist =~ s/</\$<\$/g;
     $texoptionlist =~ s/=/\$=\$/g;
+    $texoptionlist =~ s/\^(\d+)/<m>\$$1\$<\/m>/g;
     return $texoptionlist;
 }