feat: add access to applet for prolific respondent #572
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
This PR adds the ability for a prolific recruit to submit their answer for an activity. So far for this to be working, the applet has to be configured with a public link, and needs to contain only one activity.
How it works: Prolific participant is redirected to mindlogger public link. The app parses the URL and searches for 3 parameters:
PROLIFIC_PID
,SESSION_ID
&STUDY_ID
.At this point 3 checks are made:
study_id
is wrong => ERRORIf all checks passed: We store the parameters in redux and the user can take on the activity. If the user has already submitted their answer, they will be blocked and cannot take on the activity
On submission, we send the prolific parameters to the backend:
🔗 Jira Ticket M2-8336
🔗 Jira Ticket M2-8337
🔗 Jira Ticket M2-8338
Changes include:
useProlificIntegrationStateQuery
&useProlificCompletionCodeQuery
and a ProlificService to request the backendselector
for prolific🪤 Peer Testing
You need this PR in the backend to be running
✏️ Notes