Millisecond Forums

record time spent on survey

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

By Nora.krott - 1/19/2015

Hey guys!

I'm having some trouble while programming a task in Inquisit 4.
Participants have to complete a survey; they have 13 question, 10 minutes time to solve them, they can scroll through the questions and end the survey whenever they want (finish button).
I already have a timer showing the elapsed time to participants:

<clock timer_survey>
/ mode = timer
/ erase = false
/resetrate = experiment
/ txcolor = yellow
/ txbgcolor = black
/ timeout = 600000
/ position = (90%, 7%)
/ format = "mm:ss"
</clock>

So what I need (and what the timer displays) is the total time they spend on the survey. Now I am trying to record this time in some variables,
but somehow the elapsedtime expression does not work...

This might be stupid but I tried:

<expressions>
/ LRT_time = clock.timer_survey.elapsedtime
</expressions>

and then 

<data>
/file = "MC_new_LRT.iqdat"
/separatefiles = true
/ columns = [expressions.LRT_time]
</data>

Somehow, this does not work but I figure there has to be a pretty easy way, since i already have the timer giving me the right data...

Can someone maybe help me out?

Thanks so much,
Nora
By Dave - 1/19/2015

The <data> element does not apply to <survey> elements -- output for <survey>s cannot be customized. <data> only applies to <block>s.

The only thing you can do is use <summarydata>:

<survey mysurvey>
/ pages = [1=a; 2=b]
</survey>

<surveypage a>
/ questions = [1=q1]
</surveypage>

<surveypage b>
/ questions = [1=q2]
</surveypage>

<radiobuttons q1>
/ options = ("A", "B")
</radiobuttons>

<radiobuttons q2>
/ options = ("C", "D")
</radiobuttons>

<summarydata>
/ file = "surveyelapsed.iqdat"
/ columns = [script.elapsedtime]
</summarydata>


By Nora.krott - 1/19/2015

Perfect, it works with summarydata instead of data.

Thanks so much, you really helped me out!