[LON-CAPA-cvs] cvs: loncom /homework matchresponse.pm
sakharuk
lon-capa-cvs@mail.lon-capa.org
Wed, 24 Sep 2003 18:14:30 -0000
sakharuk Wed Sep 24 14:14:30 2003 EDT
Modified files:
/loncom/homework matchresponse.pm
Log:
Bug 2225 (matchresponse shows answers in printout) is fixed. In addition I've removed triangles from output for 'tex' target in non-exam mode.
Index: loncom/homework/matchresponse.pm
diff -u loncom/homework/matchresponse.pm:1.23 loncom/homework/matchresponse.pm:1.24
--- loncom/homework/matchresponse.pm:1.23 Mon Sep 22 16:49:01 2003
+++ loncom/homework/matchresponse.pm Wed Sep 24 14:14:30 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Full matching style response
#
-# $Id: matchresponse.pm,v 1.23 2003/09/22 20:49:01 albertel Exp $
+# $Id: matchresponse.pm,v 1.24 2003/09/24 18:14:30 sakharuk Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -369,7 +369,7 @@
%name_letter_map=
%{ $Apache::response::itemgroup{'name_letter_map'} };
}
- if ( &Apache::response::show_answer() ) {
+ if ((($solved =~ /^correct/) || ($status eq 'SHOW_ANSWER')) && ($target ne 'tex')) {
foreach my $name (@whichfoils) {
my $text=$Apache::response::foilgroup{$name.'.text'};
my $value=$Apache::response::foilgroup{$name.'.value'};
@@ -590,7 +590,7 @@
}
} else {
if ($target eq 'tex') {
- $Apache::response::foilgroup{"$name.text"} = ' $\triangleright$ '.$text;
+ $Apache::response::foilgroup{"$name.text"} = $text;
} else {
$Apache::response::foilgroup{"$name.text"} = $text;
}