[LON-CAPA-cvs] cvs: loncom /homework/caparesponse caparesponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 11 Jul 2005 18:35:23 -0000
albertel Mon Jul 11 14:35:23 2005 EDT
Modified files:
/loncom/homework/caparesponse caparesponse.pm
Log:
- BUG#4213 Don't include the unit when testing the instructor answer and we are in a no unit mode (exam and turnunitoff set to yes)
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.173 loncom/homework/caparesponse/caparesponse.pm:1.174
--- loncom/homework/caparesponse/caparesponse.pm:1.173 Mon Jul 11 14:24:12 2005
+++ loncom/homework/caparesponse/caparesponse.pm Mon Jul 11 14:35:23 2005
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# caparesponse definition
#
-# $Id: caparesponse.pm,v 1.173 2005/07/11 18:24:12 albertel Exp $
+# $Id: caparesponse.pm,v 1.174 2005/07/11 18:35:23 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -353,7 +353,11 @@
#}
}
my $response=$ans;
- if ($unit) {
+ my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.
+ $id.'.turnoffunit');
+ if ($unit ne '' &&
+ ! ($Apache::lonhomework::type eq 'exam' ||
+ lc($hideunit) eq "yes") ) {
my $cleanunit=$unit;
$cleanunit=~s/\$\,//g;
$response.=" $cleanunit";