Progress bar in a block


Author
Message
Rebecca17
Rebecca17
Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)Respected Member (434 reputation)
Group: Forum Members
Posts: 7, Visits: 25
How can I implement, that the width of a progress bar depends on the number (1-6) of the current item?
My idea is the following, but it doesn't work:

<shape progressbar>
/ shape = rectangle
/ color = grey
/ position = (50%, 10%)
/ size = (0%, 5%)
/ width = 80% * (text.WS.currentitemnumber/25)

<block WS>
/ trials = [1-6 = WS]
</block>

<trial WS>
/ stimulusframes = [1 = WSF]
</trial>

<text WS>
/ items = WS
/ select = sequence (1,2,3,4,5,6)
/ position = (50%, 30%)
</text>

<item WS>
/1 = "Wort1"
/2 = "Wort2"
/3 = "Wort3"
/4 = "Wort4"
/5 = "Wort5"
/6 = "Wort6"
</item>
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Rebecca17 - Wednesday, January 30, 2019
How can I implement, that the width of a progress bar depends on the number (1-6) of the current item?
My idea is the following, but it doesn't work:

<shape progressbar>
/ shape = rectangle
/ color = grey
/ position = (50%, 10%)
/ size = (0%, 5%)
/ width = 80% * (text.WS.currentitemnumber/25)

<block WS>
/ trials = [1-6 = WS]
</block>

<trial WS>
/ stimulusframes = [1 = WSF]
</trial>

<text WS>
/ items = WS
/ select = sequence (1,2,3,4,5,6)
/ position = (50%, 30%)
</text>

<item WS>
/1 = "Wort1"
/2 = "Wort2"
/3 = "Wort3"
/4 = "Wort4"
/5 = "Wort5"
/6 = "Wort6"
</item>

<shape progressbar>
/ shape = rectangle
/ color = grey
/ position = (50%, 10%)
/ size = (0%, 5%)
/ erase = false
</shape>

<block WS>
/ trials = [1-6 = WS]
</block>

<trial WS>
/ ontrialbegin = [
shape.progressbar.width = 80% * (text.WS.nextindex/25);
]
/ stimulusframes = [1 = WS, progressbar]
/ validresponse = (57)
</trial>

<text WS>
/ items = WS
/ select = sequence (1,2,3,4,5,6)
/ position = (50%, 30%)
</text>

<item WS>
/1 = "Wort1"
/2 = "Wort2"
/3 = "Wort3"
/4 = "Wort4"
/5 = "Wort5"
/6 = "Wort6"
</item>

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search