Number of sessions property

Ask questions and discuss programming issues around Tatool Java.
Locked
StoneJ
Posts: 50
Joined: Thu Aug 29, 2013 10:39 am
Institution: University of Lancaster, UK

Number of sessions property

Post by StoneJ » Fri Mar 14, 2014 12:54 pm

When a participant opens the tatool client and selects a module it gives them a Number of Sessions value to indicate how many sessions they have done. It seems a bit odd that this number increases if the person opens the module then closes it immediately. My adult participants seem to do this a lot and then they lose track of how many sessions they have actually done because the counter includes non-complete sessions.

This also affects the web interface for monitoring an online study. It actually makes the average level output entirely redundant.

I would presume there are a number of properties relating to session i.e. session.started and session.completed etc. I think it would be more sensible if it only included sessions which are completed properly, this part of tatool online is causing some confusion to both myself as a researcher administering an experiment and my participants.

Kind Regards,


James

alocher
Posts: 259
Joined: Tue Apr 24, 2012 12:56 pm
Institution: Tatool

Re: Number of sessions property

Post by alocher » Sat Mar 15, 2014 4:04 am

Hey James,

Thanks for your post and the feedback regarding the session counter on the Tatool Home Screen. As of course our documentation is lacking, I'm going to document quickly the elements involved in getting to that number and how you can steer what's happening.


1. How does Tatool decide whether a session is completed or not?

The logic Tatool follows is pretty simple: If a user is allowed to quit in the middle of a session by pressing the Escape key (the allowEscapeKey is set to "true" within the ch.tatool.core.element.handler.EscapeKeyEventHandler) then the session is completed as it was allowed to shutdown properly as intended by the creator of the module. On the other hand if the Escape key is disabled, the creator of the module intended that the session is only completed if finished and therefore the user is not allowed to quit in the middle of a session. If the user still tries to exit the session by killing the Tatool session process, it will result in an incomplete session.

You'll find the following three columns in the Tatool data export which provide this session runtime information:
- session.startTime: The start time of a session (triggered by pressing the "Start" button)
- session.endTime: The end time of a session (triggered by the closing of the session window)
- session.completed: Indicator whether a session was successfully completed (=1) or canceled in some way (=0)

Genererally the endTime of a session will always be set, unless the user manually kills the main Tatool process in the background (e.g. via Task Manager in Windows). If the user manually kills the Tatool Session process (the session window but not the Tatool main window), the endTime will still be set BUT the session.completed will be 0. So in order to identify whether a session has been properly finished until the end the session.completed column is your best bet.

2. How is the value "Number of Sessions:" in the Tatool main window calculated?

Tatool counts the number of Sessions in a module where the column session.completed = 1.

3. How can I change the behavior of Tatool to not treat a session as completed if the user presses Escape?

Create your own version of the EscapeKeyEventHandler by copying the existing one in ch.tatool.core.element.handler.EscapeKeyEventHandler. In your code you should remove the following line to make sure the session is not marked as "completed".

Code: Select all

context.getExecutionData().setSessionCompleted(SESSION_COMPLETED);

StoneJ
Posts: 50
Joined: Thu Aug 29, 2013 10:39 am
Institution: University of Lancaster, UK

Re: Number of sessions property

Post by StoneJ » Sat Mar 15, 2014 7:46 am

Thank you very much for the detailed response, I will use this in my future projects using tatool. There are a number of things I have modified in my tatool distribution to get the behaviour I want but where the documentation gives me nothing to go on I tend to try and leave it as my programming knowledge is pretty low!

Thanks again it's much appreciated,


James

Locked

Who is online

Users browsing this forum: No registered users and 1 guest