--- loncom/homework/response.pm 2004/12/23 22:53:41 1.112 +++ loncom/homework/response.pm 2005/02/24 00:36:10 1.114 @@ -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.114 2005/02/24 00:36:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -431,13 +431,11 @@ sub end_responseparam { } sub start_parameter { - my $result = &start_responseparam(@_); - return $result; + return &start_responseparam(@_); } sub end_parameter { - my $result = &end_responseparam(@_); - return $result; + return &end_responseparam(@_); } sub reset_params { @@ -715,6 +713,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__