Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 7 additions & 16 deletions frontend/src/editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ function Router({
<h1>Welcome!</h1>
<p>
Thank you for agreeing to participate in our writing study. You'll complete three writing tasks on different topics.
After completing each task, click 'Done' to save your work and continue to the next task.
As you write, pay attention to the suggestions the writing tool offers and use them when
they seem helpful. There are no right or wrong ways to interact with the tool.
Your responses will be kept confidential. You can ask questions at any time.
Expand Down Expand Up @@ -439,7 +438,13 @@ function Router({
else if (page === 'study-postStudySurvey') {
const nextUrlParams = new URLSearchParams(window.location.search);
nextUrlParams.set('page', nextPage);
const redirectURL = encodeURIComponent(window.location.origin + `/editor.html?${nextUrlParams.toString()}`);
const isProlific = urlParams.get('isProlific') === 'true';
let redirectURL;
if (isProlific) {
redirectURL = 'https://app.prolific.com/submissions/complete?cc=C998008G'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this replaces study-final?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the participant is a Prolific user then it redirects them back to Prolific after the final survey. If they are not, then it leads to the study-final page that lets them know the study has been completed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want a log message? Maybe we don't need one.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I removed it!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant: it looked like the Prolific path wouldn't end up with a log message, so if we wanted a log in that case we'd need to add it... but either way.

} else {
redirectURL = encodeURIComponent(window.location.origin + `/editor.html?${nextUrlParams.toString()}`);
}
const postStudySurveyURL = SURVEY_URLS.postStudy;

return (
Expand All @@ -466,20 +471,6 @@ function Router({
return <div className={classes.studyIntroContainer}>
<h1>Study Complete</h1>
<p>Thank you for participating in our writing study.</p>
<button
onClick={() => {
log ({
username: username,
event: 'FinishedStudy',
interaction: 'User finished the study'
});
urlParams.set('page', 'study-intro')
window.location.search = urlParams.toString();
}}
className={classes.startButton}
>
Return to Start
</button>
</div>;
}
else {
Expand Down
Loading