def submit_response(self, question_id, answer_form=None):
if answer_form is None:<EOL><INDENT>response = {'<STR_LIT>': NULL_RESPONSE,<EOL>'<STR_LIT>': str(question_id)}<EOL><DEDENT>else:<EOL><INDENT>response = dict(answer_form._my_map)<EOL>response['<STR_LIT>'] = DateTime.utcnow()<EOL>try:<EOL><INDENT>response['<STR_LIT>'] = self._get_item(question_id).is_response_correct(<EOL>Response(osid_object_map=response, runtime=self._runtime, proxy=self._proxy))<EOL><DEDENT>except (errors.IllegalState, errors.NotFound):<EOL><INDENT>response['<STR_LIT>'] = None<EOL><DEDENT><DEDENT>response['<STR_LIT>'] = DateTime.utcnow()<EOL>question_map = self._get_question_map(question_id)  <EOL>if ('<STR_LIT>' in question_map['<STR_LIT>'][<NUM_LIT:0>] and<EOL>question_map['<STR_LIT>'][<NUM_LIT:0>]['<STR_LIT>'] == UNANSWERED):<EOL><INDENT>question_map['<STR_LIT>'] = []  <EOL><DEDENT>question_map['<STR_LIT>'].insert(<NUM_LIT:0>, response)<EOL>self._save()<EOL>
Updates assessmentParts map to insert an item response.

        answer_form is None indicates that the current response is to be cleared