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

sakharuk lon-capa-cvs@mail.lon-capa.org
Thu, 24 Oct 2002 19:20:17 -0000


sakharuk		Thu Oct 24 15:20:17 2002 EDT

  Modified files:              
    /loncom/homework	inputtags.pm 
  Log:
  Changes in decideoutput subroutine to avoide printing html <b> tag.
  
  
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.67 loncom/homework/inputtags.pm:1.68
--- loncom/homework/inputtags.pm:1.67	Thu Oct 24 15:13:53 2002
+++ loncom/homework/inputtags.pm	Thu Oct 24 15:20:17 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # input  definitons
 #
-# $Id: inputtags.pm,v 1.67 2002/10/24 19:13:53 sakharuk Exp $
+# $Id: inputtags.pm,v 1.68 2002/10/24 19:20:17 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -234,7 +234,7 @@
 }
 
 sub decideoutput {
-  my ($award,$solved,$previous)=@_;
+  my ($award,$solved,$previous,$target)=@_;
   my $message='';
   my $button=0;
   my $previousmsg;
@@ -242,8 +242,13 @@
   if ($previous) { $previousmsg='You have entered that answer before'; }
 
   if      ($solved =~ /^correct/) {
-    $message = "<b>You are correct.</b> Your receipt is ".
+    if ($target eq 'tex') {
+      $message = '\textbf{You are correct}. Your receipt is '.
       &Apache::lonnet::receipt;
+    } else {
+      $message = "<b>You are correct.</b> Your receipt is ".
+      &Apache::lonnet::receipt;
+    }
     $button=0;
     $previousmsg='';
   } elsif ($solved =~ /^excused/) {
@@ -408,7 +413,7 @@
     if ( $award ne '' ) {
       &Apache::lonxml::debug('Getting message');
       ($showbutton,$message,$previousmsg) =
-	&decideoutput($award,$solved,$previous);
+	&decideoutput($award,$solved,$previous,$target);
       if ($target eq 'tex') {
 	$message=' '.$message.' ';
       } else {