--- loncom/homework/response.pm 2004/12/23 22:53:41 1.112 +++ loncom/homework/response.pm 2005/01/31 22:00:40 1.113 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.112 2004/12/23 22:53:41 albertel Exp $ +# $Id: response.pm,v 1.113 2005/01/31 22:00:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -715,6 +715,19 @@ sub get_response_param { return $parameter; } +sub submitted { + my ($who)=@_; + + # when scatron grading any submission is a submission + if ($ENV{'form.submitted'} eq 'scantron') { return 1; } + # if the caller only cared if this was a scantron submission + if ($who eq 'scantron') { return 0; } + # if the Submit Answer button for this particular part was pressed + my $partid=$Apache::inputtags::part; + if (defined($ENV{'form.submit_'.$partid})) { return 1; } + # otherwise no submission occured + return 0; +} 1; __END__