[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Thu, 13 Mar 2003 16:20:48 -0000
sakharuk Thu Mar 13 11:20:48 2003 EDT
Modified files:
/loncom/homework/caparesponse caparesponse.pm
Log:
Made the printing of units for exam better (put in more correct place in the program - now it does not depend on other parameters).
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.81 loncom/homework/caparesponse/caparesponse.pm:1.82
--- loncom/homework/caparesponse/caparesponse.pm:1.81 Mon Mar 3 09:39:41 2003
+++ loncom/homework/caparesponse/caparesponse.pm Thu Mar 13 11:20:47 2003
@@ -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.82 2003/03/13 16:20:47 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -178,9 +178,6 @@
if ($target eq 'web') {
$result="<br />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++) {
@@ -218,6 +215,9 @@
my (@answers)=&Apache::lonxml::get_param_var('answer',$parstack,$safeeval);
my (@formats)=&Apache::lonxml::get_param_var('format',$parstack,$safeeval);
my $unit=&Apache::lonxml::get_param_var('unit',$parstack,$safeeval);
+ if (defined $unit and $Apache::lonhomework::type eq 'exam') {
+ $result.=' \textit{(in} \verb|'.$unit.'|\textit{)} ';
+ }
my $number_of_bubbles = 8; #default values for number of bubbles
my @bubbles_values = ();
my @factors = (1.13,1.17,1.25,1.33,1.45); #default values of factors