Millisecond Forums

Progress Feedback based on blocknumber

https://forums.millisecond.com/Topic30401.aspx

By Athanasia - 12/16/2020

After the end of each block, I want the participants to receive a feedback related to the number of blocks that have been completed. According to this https://www.millisecond.com/support/docs/v6/html/language/properties/currentblocknumber.htm
I created a Break page
<page Break>
You have now completed block <%expt.currentblocknumber%> out of 6.
^^Please feel free to take a short break now. Before you continue, we remind you that the words on the sides of the screen may have changed.
</page>
But it sais that “Expression 'block.currentblocknumber' is invalid. Expression contains an unknown element or property name.”
Why is this happening?

I also try to find a way to show a “thank you” page (instead of break) if the blocknumber is number 6 (the last one), but I m not familiar with expression syntax. Could you help me?
Thank you in advance
By Dave - 12/16/2020

Athanasia - 12/16/2020
After the end of each block, I want the participants to receive a feedback related to the number of blocks that have been completed. According to this https://www.millisecond.com/support/docs/v6/html/language/properties/currentblocknumber.htm
I created a Break page
<page Break>
You have now completed block <%expt.currentblocknumber%> out of 6.
^^Please feel free to take a short break now. Before you continue, we remind you that the words on the sides of the screen may have changed.
</page>
But it sais that “Expression 'block.currentblocknumber' is invalid. Expression contains an unknown element or property name.”
Why is this happening?

I also try to find a way to show a “thank you” page (instead of break) if the blocknumber is number 6 (the last one), but I m not familiar with expression syntax. Could you help me?
Thank you in advance

A script may have multiple <expt>s. Hence, as always, you are required to specify an element's name when you are trying to reference an element's property. If you have not explicitly named the one or several <expt> elements in your script, they are given numerical identifiers internally as in

<expt>
/ blocks = [1-6 = myblock]
</expt>

<block myblock>
/ postinstructions = (Break)
/ trials = [1=mytrial]
</block>

<page Break>
<%if (expt.1.currentblocknumber < 6) item.breaktext.item(1) else item.breaktext.item(2)%>
</page>

<item breaktext>
/ 1 = "You have now completed block <%expt.1.currentblocknumber%> out of 6.


Please feel free to take a short break now. Before you continue, we remind you that the words on the sides of the screen may have changed."
/ 2 = "Thank you!"
</item>


<trial mytrial>
/ stimulusframes = [1=mytext]
/ validresponse = (57)
</trial>

<text mytext>
/ items = ("Press SPACE")
</text>
By Athanasia - 12/16/2020

Thank you so much for your super fast response!!