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

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 13 May 2003 15:27:46 -0000


sakharuk		Tue May 13 11:27:46 2003 EDT

  Modified files:              
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
   Changes neccessry to print problems with answers.
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.97 loncom/homework/caparesponse/caparesponse.pm:1.98
--- loncom/homework/caparesponse/caparesponse.pm:1.97	Fri May  9 18:24:05 2003
+++ loncom/homework/caparesponse/caparesponse.pm	Tue May 13 11:27:45 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.97 2003/05/09 22:24:05 albertel Exp $
+# $Id: caparesponse.pm,v 1.98 2003/05/13 15:27:45 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -318,7 +318,13 @@
 	    }
 	    if ($target eq 'answer') {
 		if ($high) { $ans.=' ['.$low.','.$high.']'; }
-		if ($sighigh) { $ans.= " Sig <i>$siglow - $sighigh</i>"; }
+		if ($sighigh) { 
+		    if ($ENV{'form.print_answer'} eq 'yes') {
+			$ans.= " Sig \\textit{$siglow - $sighigh}"; 
+		    } else {
+			$ans.= " Sig <i>$siglow - $sighigh</i>"; 
+		    }
+		}
 		$result.=&Apache::response::answer_part($$tagstack[-1],$ans);
 	    } elsif ($target eq 'analyze') {
 		push (@{ $Apache::lonhomework::analyze{"$part_id.answer"} }, $ans);
@@ -330,8 +336,13 @@
 	}
 	if ($unit) {
 	    if ($target eq 'answer') {
-		$result.=&Apache::response::answer_part($$tagstack[-1],
-							"Unit: <b>$unit</b>");
+		if ($ENV{'form.print_answer'} eq 'yes') {
+		    $result.=&Apache::response::answer_part($$tagstack[-1],
+							    "Unit: \\verb|$unit|");
+		} else {
+		    $result.=&Apache::response::answer_part($$tagstack[-1],
+							    "Unit: <b>$unit</b>");
+		}
 	    } elsif ($target eq 'analyze') {
 		push (@{ $Apache::lonhomework::analyze{"$part_id.unit"} },
 		      $unit);