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

raeburn raeburn@source.lon-capa.org
Sat, 10 Jul 2010 13:51:05 -0000


raeburn		Sat Jul 10 13:51:05 2010 EDT

  Modified files:              
    /loncom/homework	lonhomework.pm 
  Log:
  - Eliminate TeX errors when printing .page or .sequence with answers (or only answers) from Construction Space.
  
  
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.319 loncom/homework/lonhomework.pm:1.320
--- loncom/homework/lonhomework.pm:1.319	Tue Mar 16 19:55:37 2010
+++ loncom/homework/lonhomework.pm	Sat Jul 10 13:51:05 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Homework handler
 #
-# $Id: lonhomework.pm,v 1.319 2010/03/16 19:55:37 droeschl Exp $
+# $Id: lonhomework.pm,v 1.320 2010/07/10 13:51:05 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -111,7 +111,11 @@
 	} elsif ( $env{'form.grade_target'} eq 'webgrade'
 		  && ($Apache::lonhomework::queuegrade eq 'F' )) {
 	    return ($env{'form.grade_target'});
-	}
+	} elsif ($env{'form.grade_target'} eq 'answer') {
+            if ($env{'form.answer_output_mode'} eq 'tex') {
+                return ($env{'form.grade_target'});
+            }
+        }
 	if ($env{'form.webgrade'} &&
 	    ($Apache::lonhomework::modifygrades eq 'F'
 	     || $Apache::lonhomework::queuegrade eq 'F' )) {