[LON-CAPA-cvs] cvs: loncom(version_2_9_X) /homework/caparesponse caparesponse.pm

raeburn raeburn@source.lon-capa.org
Fri, 20 Aug 2010 03:44:18 -0000


raeburn		Fri Aug 20 03:44:18 2010 EDT

  Modified files:              (Branch: version_2_9_X)
    /loncom/homework/caparesponse	caparesponse.pm 
  Log:
  - Backport 1.238.
  
  
Index: loncom/homework/caparesponse/caparesponse.pm
diff -u loncom/homework/caparesponse/caparesponse.pm:1.236 loncom/homework/caparesponse/caparesponse.pm:1.236.12.1
--- loncom/homework/caparesponse/caparesponse.pm:1.236	Thu Jan 15 18:31:23 2009
+++ loncom/homework/caparesponse/caparesponse.pm	Fri Aug 20 03:44:18 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # caparesponse definition
 #
-# $Id: caparesponse.pm,v 1.236 2009/01/15 18:31:23 bisitz Exp $
+# $Id: caparesponse.pm,v 1.236.12.1 2010/08/20 03:44:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -305,7 +305,7 @@
 	my $hideunit=&Apache::lonnet::EXT('resource.'.$partid.'_'.$id.'.turnoffunit');
 	&Apache::lonxml::debug("Got unit $hideunit for $partid $id");
 	#no way to enter units, with radio buttons
-	if (lc($hideunit) eq "yes") {
+        if ((lc($hideunit) eq "yes") && ($Apache::lonhomework::type ne 'exam')) {
 	    my $unit=&Apache::lonxml::get_param_var('unit',$parstack,
 						    $safeeval);
 	    if ($unit =~ /\S/) { $result.=" (in $unit) "; }