Skip to content

Commit

Permalink
add prompt box and audio to finishExperiment screen
Browse files Browse the repository at this point in the history
  • Loading branch information
zwatson2001 committed Aug 15, 2024
1 parent 0139cb9 commit 2b8888f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions task-launcher/src/tasks/shared/trials/finishExperiment.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { jsPsych } from "../../taskSetup";
import { taskStore } from "../helpers";
import { taskStore, PageAudioHandler } from "../helpers";
import { mediaAssets} from '../../..';


export function finishExperiment() {
const t = taskStore().translations;
jsPsych.endExperiment(
`<div id="prompt-container-text">
<p id="prompt">${t?.taskCompletion || 'Thank you for completing the task! You can now close the window.'}</p>
</div>`,
); // ToDo: style text and add audio message?
`<div class='instructions-container'>
<div class='lev-row-container instruction'>
<h1 class='instructions-title'>${t.taskFinished}</h1>
</div>
</div>`,
PageAudioHandler.playAudio(mediaAssets.audio.taskFinished)
);
}
2 changes: 1 addition & 1 deletion task-launcher/src/tasks/shared/trials/taskFinished.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const taskFinished = {
<div class='instructions-container'>
<div class='lev-row-container instruction'>
<h1 class='instructions-title'>${t.taskFinished}</h1>
</div>'
</div>
<footer>${t.generalFooter}</footer>
</div>`;
},
Expand Down

0 comments on commit 2b8888f

Please sign in to comment.