-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exit code for failing equipment check (#956)
* Add a reference to whether the discussion failed * Allow selecting customIDInstructions from URL params * fix tests * validate auto-populated ID * exit code for failing equipment check * Add copy code buttons * Log sources from url params * Update validateBatchConfig.test.js
- Loading branch information
1 parent
e586ac6
commit f8ea467
Showing
12 changed files
with
99 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ import { usePlayer } from "@empirica/core/player/classic/react"; | |
import { Loading } from "@empirica/core/player/react"; | ||
import { Markdown } from "../components/Markdown"; | ||
import { useIdleContext } from "../components/IdleProvider"; | ||
import { Button } from "../components/Button"; | ||
|
||
export function Debrief() { | ||
const player = usePlayer(); | ||
|
@@ -31,34 +32,55 @@ export function Debrief() { | |
|
||
const exitCodes = player.get("exitCodes"); | ||
|
||
const debriefStatements = ` | ||
# Finished 🎉 | ||
## Thank you for participating! | ||
${ | ||
exitCodes && | ||
exitCodes !== "none" && | ||
`Please enter the following completion code on your recruitment platform: | ||
> ${exitCodes?.complete}` | ||
} | ||
const copyToClipboard = () => { | ||
navigator.clipboard.writeText(exitCodes.complete); | ||
// eslint-disable-next-line no-alert | ||
alert( | ||
`Copied "${exitCodes.complete}" to clipboard. Please enter this code for a partial payment, then close the experiment window.` | ||
); | ||
}; | ||
|
||
const debriefStatements = ` | ||
### About this study | ||
_Social scientists have tested different ways to improve small group conversations, like using a facilitator, setting an agenda, or creating ground rules. While some methods work better than others, it’s challenging to know which will be the most effective. What we do know is that different types of conversations need different kinds of support._ | ||
_Instead of looking for one solution that works for all conversations, our research team is mapping out what helps each specific type of conversation. Your participation in this study provides valuable data that, combined with data from other discussions, will help us understand how the context of a discussion shapes its outcomes._ | ||
_For any additional questions, please contact the University of Pennsylvania research team by | ||
emailing **[[email protected]](mailto:[email protected])**._ | ||
`; | ||
|
||
${ | ||
exitCodes !== "none" | ||
? `👉 After copying the payment code above, you may close this window.` | ||
: "" | ||
} | ||
`; | ||
return ( | ||
<div className="grid justify-center"> | ||
<h1> | ||
<span role="img" aria-label="Party popper"> | ||
Finished! 🎉 | ||
</span>{" "} | ||
Thank you for participating! | ||
</h1> | ||
{exitCodes !== "none" && ( | ||
<div> | ||
<h3> | ||
Please enter the following completion code on your recruitment | ||
platform: | ||
</h3> | ||
<div className="mt-4"> | ||
<span className="font-bold font-mono text-center mr-2"> | ||
{exitCodes?.complete} | ||
</span> | ||
<Button | ||
handleClick={copyToClipboard} | ||
className="px-2 py-1 bg-blue-500 text-white text-xs rounded" | ||
> | ||
Copy to clipboard | ||
</Button> | ||
</div> | ||
</div> | ||
)} | ||
|
||
<Markdown text={debriefStatements} /> | ||
|
||
<h3>You may now close this window.</h3> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters