jsPsych.endExperiment in JATOS #1411
-
Hi! I have an experiment in which I use
This works perfectly when I run the experiment on my computer, but in JATOS, the message disappears immediately. This is my code:
Do you know what I could do to make this work in JATOS? Thanks! Catherine |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi Catherine, I don't have much experience working with JATOS, but I suspect that the var end_experiment = {
type: 'call-function',
func: function(){
var resultats = jsPsych.data.get().csv();
jatos.endStudy(resultats);
}
} |
Beta Was this translation helpful? Give feedback.
-
Hi Catherine, var resultats = jsPsych.data.get().csv();
jatos.submitResultData(resultats)
.then(jatos.endStudyAjax) I hope this helps! And if you have any JATOS-related follow-up questions, feel free to post on the JATOS google group 😃 |
Beta Was this translation helpful? Give feedback.
Hi Catherine,
The
jatos.endStudy
function will automatically redirect to their end study page, which means that any jsPsych content that you want to remain on the page will no longer be visible once that function is called. If you want to end the study in JATOS without redirecting to their end page, you can use thejatos.endStudyAjax
function. Note that if you want to send the results back to JATOS before ending the study, then you should do something like example 5 in the JATOS endStudyAjax docs:I hope this helps! And if you have any JATOS-related follow-up questions, feel free to pos…