--- loncom/homework/response.pm 2004/02/16 20:09:51 1.91 +++ loncom/homework/response.pm 2004/02/27 17:18:32 1.92 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # various response type definitons response definition # -# $Id: response.pm,v 1.91 2004/02/16 20:09:51 albertel Exp $ +# $Id: response.pm,v 1.92 2004/02/27 17:18:32 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -45,6 +45,16 @@ sub start_response { push (@Apache::inputtags::response,$id); push (@Apache::inputtags::responselist,$id); @Apache::inputtags::inputlist=(); + if ($Apache::inputtags::part eq '') { + &Apache::lonxml::error(&HTML::Entities::encode(&mt("Found a <*response> outside of a in a ed problem"))); + } + if ($Apache::inputtags::response_with_no_part && + $Apache::inputtags::part ne '0') { + &Apache::lonxml::error(&HTML::Entities::encode(&mt("<*response>s are both inside of and outside of , this is not a valid problem, errors in grading may occur.")).'
'); + } + if ($Apache::inputtags::part eq '0') { + $Apache::inputtags::response_with_no_part=1; + } return $id; }