--- loncom/homework/caparesponse/caparesponse.pm 2003/03/03 14:39:41 1.81
+++ loncom/homework/caparesponse/caparesponse.pm 2003/03/13 16:24:13 1.83
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.81 2003/03/03 14:39:41 sakharuk Exp $
+# $Id: caparesponse.pm,v 1.83 2003/03/13 16:24:13 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,9 +178,6 @@ sub end_numericalresponse {
if ($target eq 'web') {
$result="
The correct answer is ";
} elsif ($target eq 'tex') {
- if (defined $unit and $Apache::lonhomework::type eq 'exam') {
- $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
- }
#$result='\vskip 0 mm The correct answer is \\texttt{';
}
for (my $i=0; $i <= $#answers; $i++) {
@@ -265,6 +262,9 @@ sub end_numericalresponse {
$result.= '
Formula have to be entered here!
';
}
} elsif ($target eq 'tex') {
+ if (defined $unit and $Apache::lonhomework::type eq 'exam') {
+ $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
+ }
if ($$tagstack[-1] eq 'numericalresponse') {
my $max_val = 0;
if ($formats[0]=~m/^(\d+)E([^\d]*)(\d*)$/) {