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

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


sakharuk		Tue May 13 11:44:39 2003 EDT

  Modified files:              
    /loncom/homework	response.pm 
  Log:
  Changes which do not allow show up LaTeX chunks on the screen for the construction space.
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.75 loncom/homework/response.pm:1.76
--- loncom/homework/response.pm:1.75	Tue May 13 11:27:01 2003
+++ loncom/homework/response.pm	Tue May 13 11:44:39 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.75 2003/05/13 15:27:01 sakharuk Exp $
+# $Id: response.pm,v 1.76 2003/05/13 15:44:39 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -363,7 +363,7 @@
 sub answer_header {
     my ($type) = @_;
     my $result;
-    if ($ENV{'form.print_answer'} eq 'yes') {
+    if (($ENV{'form.print_answer'} eq 'yes') && ($ENV{'form.grade_target'} eq 'answer')) {
 	$result = ' \vskip 0 mm \begin{tabular}{|c|}\hline Answer for Part: '.
                   $Apache::inputtags::part.' \\\\ \hline ';
     } else {
@@ -381,7 +381,7 @@
 sub answer_part {
     my ($type,$answer) = @_;
     my $result;
-    if ($ENV{'form.print_answer'} eq 'yes') {
+    if (($ENV{'form.print_answer'} eq 'yes') && ($ENV{'form.grade_target'} eq 'answer')) {
 	$result = ' '.$answer.'\\\\ \hline ';
     } else {
 	if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {
@@ -396,7 +396,7 @@
 sub answer_footer {
     my ($type) = @_;
     my $result;
-    if ($ENV{'form.print_answer'} eq 'yes') {
+    if (($ENV{'form.print_answer'} eq 'yes') && ($ENV{'form.grade_target'} eq 'answer')) {
 	$result = ' \end{tabular} \vskip 0 mm ';
     } else {
 	if ($type eq 'optionresponse' || $type eq 'radiobuttonresponse') {