Module frontend.app.views.participant

Functions

def delete_participant(id)

Deletes a participant from the system.

Args

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

Returns

Redirects to the dashboard page after the participant is deleted.

def new_participant(study_id)

Handles the creation of a new participant or redirect to login for returning participants.

Args

study_id : int
The ID of the study where the participant will be added.

Returns

Renders the join page with a form for new or returning participants.

def participant(id)

Displays the participant's information and allows file download for the participant's resume.

Args

id : int
The ID of the participant whose information is to be displayed.

Returns

Renders the participant page with the participant's information and options to download a resume.

def participants(id)

Displays a list of participants and their answer statuses for a specific study.

Args

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

Returns

Renders the participants page with a list of participants and their answer statistics.

def resume(id, code)

Validates the participant's code and redirects accordingly.

Args

id : int
The ID of the participant.
code : int
The code provided by the participant for validation.

Returns

Redirects to the participant page if the code is correct, otherwise redirects to the home page.

def returning_participant(study_id)

Handles login for returning participants and redirects to the assessment page.

Args

study_id : int
The ID of the study for which the participant is returning.

Returns

Renders the returning participant login page or redirects to the assessment page if credentials are correct.