Hi, I tried what was suggested for dynamical response time limits, but I can't make dynamical timeouts work. I'm copying the code (respectively, on the page there is first php than html, than the question), and if you have some further advice i would be eternally grateful :)
This is the PHP code:
$tPAT = valueMean(array('RT05_01a', 'RT05_02a',
'RT05_03a', 'RT05_04a', 'RT05_05a'));
registerVariable('tPAT');
replace('%remain%', $tPAT);
- "RT05_01a" to "RT05_05a" are variable names for response times recorded during the Reading Test (RT). For the reading test, I used an Assignment question, and the ID is RT05. Participants are presented with some text, and when they have read it, they give response by pressing space. I need mean response time because it represents mean reading time that is supposed to be used in the next part (in which participants solve a task, with limited time for providing the answer, and the limit is mean reading time (tPAT in the code above) PLUS 500 milliseconds)
This is the html part, that is on the same page as PHP, but below:
<script type="text/javascript">
function next()
// Forward participant onto the next page
SoSciTools.submitPage();
}
window.addEventListener("load", function(evt) {
SoSciTools.questionnaire.CR03.setTimeout({
1: %remain% + 500
});
});
</script>
- CR03 is the question in which I want to set the dynamical timeout explained above the HTML code I copied. This is also an Assignment question, containing only one item, preceded by an instruction as "the text before the first stimulus".
In the debug mode I can see that the mean response time from the previous reading speed task has been calculated. Here is the printscreen you asked for:
However, the question (CR03) remains there for an unlimited amount of time instead of the mean reading time defined by tPAT + 500 milliseconds. I also tried without a placeholder, and it too doesn't work. Sorry for the lay questions, I've never done anything similar before, and javascript is a mystery for me still.
Do you have an idea what should i do?