--- loncom/homework/response.pm 2005/04/07 06:56:22 1.120 +++ loncom/homework/response.pm 2005/06/17 20:17:02 1.121 @@ -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 getresponse { 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;