Module frontend.app.views.question

Functions

def delete_question(id)

Handles the deletion of a specific question and its associated options and answers.

Args

id : int
The ID of the question to be deleted.

Returns

Renders the delete confirmation page or redirects to the study page if the question is deleted.

def new_question(id)

Handles the creation of a new question for a specific study.

Args

id : int
The ID of the study to which the new question will be added.

Returns

Renders the new question form page or redirects to the study page if the question is created.

def question(id)

Displays details of a specific question, including its options.

Args

id : int
The ID of the question to be displayed.

Returns

Renders the question details page with the question and its options.

def questions(id)

Displays a paginated list of questions for a specific study.

Args

id : int
The ID of the study whose questions are to be displayed.

Returns

Renders the questions page with the study and paginated questions.