@app.route("<STR_LIT>", methods=["<STR_LIT:POST>"])<EOL>def create_question(participant_id):
<EOL>try:<EOL><INDENT>ppt = models.Participant.query.filter_by(id=participant_id).one()<EOL><DEDENT>except NoResultFound:<EOL><INDENT>return error_response(<EOL>error_type="<STR_LIT>", status=<NUM_LIT><EOL>)<EOL><DEDENT>question = request_parameter(parameter="<STR_LIT>")<EOL>response = request_parameter(parameter="<STR_LIT>")<EOL>number = request_parameter(parameter="<STR_LIT>", parameter_type="<STR_LIT:int>")<EOL>for x in [question, response, number]:<EOL><INDENT>if isinstance(x, Response):<EOL><INDENT>return x<EOL><DEDENT><DEDENT>rejection = ppt.recruiter.rejects_questionnaire_from(ppt)<EOL>if rejection:<EOL><INDENT>return error_response(<EOL>error_type="<STR_LIT>".format(<EOL>ppt.status, rejection<EOL>),<EOL>participant=ppt,<EOL>)<EOL><DEDENT>try:<EOL><INDENT>models.Question(<EOL>participant=ppt, question=question, response=response, number=number<EOL>)<EOL>session.commit()<EOL><DEDENT>except Exception:<EOL><INDENT>return error_response(error_type="<STR_LIT>", status=<NUM_LIT>)<EOL><DEDENT>return success_response()<EOL>
Send a POST request to the question table.

    Questions store information at the participant level, not the node
    level.
    You should pass the question (string) number (int) and response
    (string) as arguments.