--- loncom/homework/response.pm 2007/02/24 01:44:14 1.159 +++ loncom/homework/response.pm 2007/03/15 02:52:16 1.160 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.159 2007/02/24 01:44:14 albertel Exp $ +# $Id: response.pm,v 1.160 2007/03/15 02:52:16 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -265,11 +265,14 @@ sub meta_response_order { } sub check_for_previous { - my ($curresponse,$partid,$id) = @_; + my ($curresponse,$partid,$id,$last) = @_; my %previous; $previous{'used'} = 0; foreach my $key (sort(keys(%Apache::lonhomework::history))) { if ($key =~ /resource\.$partid\.$id\.submission$/) { + if ( $last && $key =~ /^(\d+):/ ) { + next if ($1 >= $last); + } &Apache::lonxml::debug("Trying $key"); my $pastresponse=$Apache::lonhomework::history{$key}; if ($pastresponse eq $curresponse) {