diff --git a/frontend/src/editor/index.tsx b/frontend/src/editor/index.tsx
index f725213b..6e0da970 100644
--- a/frontend/src/editor/index.tsx
+++ b/frontend/src/editor/index.tsx
@@ -114,25 +114,40 @@ function EditorScreen() {
}
const studyPageNames = [
- 'study-introSurvey',
'study-intro',
+ 'study-introSurvey',
'study-task1',
- 'study-posttask1',
+ 'study-postTask1',
'study-task2',
- 'study-posttask2',
+ 'study-postTask2',
'study-task3',
- 'study-posttask3',
+ 'study-postTask3',
'study-final'
];
const SURVEY_URLS = {
- preStudy: 'https://calvin.co1.qualtrics.com/jfe/form/SV_eM6R5Yw7nnJ3jh4', // Pre-study survey
+ preStudy: 'https://calvin.co1.qualtrics.com/jfe/form/SV_eM6R5Yw7nnJ3jh4',
postTask1: 'https://calvin.co1.qualtrics.com/jfe/form/SV_6Vuc9vgqMuEqzVY',
postTask2: 'https://calvin.co1.qualtrics.com/jfe/form/SV_7X8tAiech6zP79A',
postTask3: 'https://calvin.co1.qualtrics.com/jfe/form/SV_1M8MN5b0H9pfYsm',
final: 'https://calvin.co1.qualtrics.com/jfe/form/SV_79DIQlYz4SJCwnk'
};
+const taskConfigs = {
+ '1': {
+ condition: 'Completion',
+ taskDescription: 'Task 1: Should companies adopt a four-day work week (working Monday through Thursday) instead of the traditional five-day schedule? Consider impacts on productivity, employee well-being, and business operations.',
+ },
+ '2': {
+ condition: 'Question',
+ taskDescription: 'Task 2: Write a cover letter for the position described. The applicant is a recent college graduate with a major in Environmental Sustainability and a minor in Marketing, with relevant internship experience. Demonstrate how their background aligns with the company’s mission and requirements. [Details are given below in the editor document]',
+ },
+ '3': {
+ condition: 'RMove',
+ taskDescription: 'Task 3: After reading these paragraphs, write a summary that explains CRISPR gene editing to your 11th grade biology classmates. Your goal is to help them understand what CRISPR is, how it works, and why it matters, using language and examples they would find clear and engaging.',
+ },
+ };
+
function Router({
page
}: {
@@ -148,22 +163,23 @@ function Router({
return ;
}
else if (page.startsWith('study')) {
+
+ getDefaultStore().set(pageNameAtom, PageName.Study);
+ getDefaultStore().set(overallModeAtom, OverallMode.study);
+
const urlParams = new URLSearchParams(window.location.search);
const username = urlParams.get('username');
if (!username) {
- return
);
}
-
- else if (page === 'study-task1') {
- const nextUrlParams = new URLSearchParams(window.location.search);
- nextUrlParams.set('page', 'study-posttask1');
-
- const condition = 'Completion'; // This would be dynamically set based on the study task
- getDefaultStore().set(studyConditionAtom, condition);
- const taskDescription = 'Task 1: Should companies adopt a four-day work week (working Monday through Thursday) instead of the traditional five-day schedule? Consider impacts on productivity, employee well-being, and business operations.';
- getDefaultStore().set(taskDescriptionAtom, taskDescription);
- return
-
{taskDescription}
+ else if (page.startsWith('study-task')){
+ const urlParams = new URLSearchParams(window.location.search);
-
-
-
-
;
}
- else if (page === 'study-task2') {
- const nextUrlParams = new URLSearchParams(window.location.search);
- nextUrlParams.set('page', 'study-posttask2');
-
- const condition = 'Question' // This would be dynamically set based on the study task
- getDefaultStore().set(studyConditionAtom, condition);
- const taskDescription = 'Task 2: Write a cover letter for the position described. The applicant is a recent college graduate with a major in Environmental Sustainability and a minor in Marketing, with relevant internship experience. Demonstrate how their background aligns with the company’s mission and requirements. [Details are given below in the editor document]';
- getDefaultStore().set(taskDescriptionAtom, taskDescription);
+ getDefaultStore().set(studyConditionAtom, taskConfig.condition);
+ getDefaultStore().set(taskDescriptionAtom, taskConfig.taskDescription);
- return
Thank you for completing Task 2. Please take a moment to complete a brief survey.
-
-
;
- }
- else if (page === 'study-task3') {
- const nextUrlParams = new URLSearchParams(window.location.search);
- nextUrlParams.set('page', 'study-posttask3');
-
- const condition = 'RMove' // This would be dynamically set based on the study task
- getDefaultStore().set(studyConditionAtom, condition);
- const taskDescription = 'Task 3: After reading these paragraphs, write a summary that explains CRISPR gene editing to your 11th grade biology classmates. Your goal is to help them understand what CRISPR is, how it works, and why it matters, using language and examples they would find clear and engaging.';
- getDefaultStore().set(taskDescriptionAtom, taskDescription);
-
- return