[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /homework	radiobuttonresponse.pm
    raeburn 
    raeburn at source.lon-capa.org
       
    Fri Sep 16 19:14:28 EDT 2011
    
    
  
raeburn		Fri Sep 16 23:14:28 2011 EDT
  Modified files:              (Branch: version_2_10_X)
    /loncom/homework	radiobuttonresponse.pm 
  Log:
  - Backport 1.150.
  
  
Index: loncom/homework/radiobuttonresponse.pm
diff -u loncom/homework/radiobuttonresponse.pm:1.148 loncom/homework/radiobuttonresponse.pm:1.148.2.1
--- loncom/homework/radiobuttonresponse.pm:1.148	Fri May 27 18:40:37 2011
+++ loncom/homework/radiobuttonresponse.pm	Fri Sep 16 23:14:28 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # mutliple choice style responses
 #
-# $Id: radiobuttonresponse.pm,v 1.148 2011/05/27 18:40:37 raeburn Exp $
+# $Id: radiobuttonresponse.pm,v 1.148.2.1 2011/09/16 23:14:28 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -555,8 +555,13 @@
 	    $dosplice=0;
 	} else {
 	    if ($topcount>0 || $bottomcount>0) {
-		$answer = int(&Math::Random::random_uniform() * ($#whichfalse+1))
-		    + $topcount;
+                my $inc = 1;
+                if (($bottomcount > 0) && ($Apache::lonhomework::type ne 'exam')) {
+                    $inc = 2;
+                }
+                $answer=int(&Math::Random::random_uniform() * ($#whichfalse+$inc))
+                        + $topcount;
+
 	    }
 	}
 	&Apache::lonxml::debug("Answer now wants $answer");
    
    
More information about the LON-CAPA-cvs
mailing list