[LON-CAPA-cvs] cvs: loncom /homework response.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 17 Jun 2005 20:17:08 -0000


albertel		Fri Jun 17 16:17:08 2005 EDT

  Modified files:              
    /loncom/homework	response.pm 
  Log:
  - need to pick a defualt weight for CSTR (BUG#4089)
  
  
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.120 loncom/homework/response.pm:1.121
--- loncom/homework/response.pm:1.120	Thu Apr  7 02:56:22 2005
+++ loncom/homework/response.pm	Fri Jun 17 16:17:02 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.120 2005/04/07 06:56:22 albertel Exp $
+# $Id: response.pm,v 1.121 2005/06/17 20:17:02 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -573,6 +573,7 @@
 sub repetition {
     my $id = $Apache::inputtags::part;
     my $weight = &Apache::lonnet::EXT("resource.$id.weight");
+    if (!defined($weight) || ($weight eq '')) { $weight=1; }
     my $repetition = int $weight/9;
     if ($weight % 9 != 0) {$repetition++;} 
     return $repetition;