Time stamp when an individual question is answered

Plus d'informations
il y a 1 mois 4 jours #188810 par ChrisMcD
I am trying to setup a survey which will be completed over several days.

Is it possible to record the exact time when an individual question (or group) was answered ? I know I can see when the whole survey was completed, but I'd like to see the time of one individual question.

Connexion ou Créer un compte pour participer à la conversation.

LimeSurvey Partners
Plus d'informations
il y a 1 mois 4 jours #188811 par holch
This is possible, see here:
manual.limesurvey.org/Activating_a_survey

When you activate the survey, you can set "Save timings" to YES and Limesurvey will record when a "page" has been submitted. You can do this for individual questions only if you use the question by question mode. In the group by group mode you will only be able to do it per group, because it will save the timings when you "submit" a page and go to the next one.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #188818 par ChrisMcD
Ah ok thanks for the reply. I was hoping to be able to use Group By Group and somehow get a a timestamp of when a question or if not when a group was completed (e.g. group1 submited at 9.53am).

Looks like this might not be possible

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #188819 par holch
Hmmm, I am not sure why you say that. I just showed you an option.

Wait, you are referring to timestamps. Maybe that is the issue. Not sure if LS just notes the time itself or the timestamp. Haven't used this feature in quite a while.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #188820 par ChrisMcD
Apologies I maybe did not make myself clear.

I have timings switched on and it will currently record how much time a user took to answer a group of questions e.g. Group 4 - 23.24(seconds)

What I would like is to be able to see the exact time of day when a group was completed. So when I export the responses I can see Group4 - 19.23:23

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #188821 par holch
Just did a quick test on the LS Demo site and seems like it is not timestamps that are saved per question, but rather the timing in between.

18,"2019-09-17 01:11:57","2","en","1658867261","2019-09-17 01:11:47","2019-09-17 01:11:57"," Demo.limesurvey.org/index.php?r=admin/su....26","","6.91","4.35 "


However, you have the timestamp when the survey was started and you have the last time stamp as well, so you probably could calculate the timestamp per question group based on this.

Or you could write the timestamp into a hidden question (not via GUI, but CSS). I am not sure how this could be done, though. Not an expert on JS.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours - il y a 1 mois 4 jours #188823 par tpartner
Can't test this week but I think you should be able to insert a hidden (via CSS) text question in each group and set the date in those questions with Expression Manager in equation questions. (I think Expression Manager will be fired on page-submit)

{myHiddenQuestion = date()}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Dernière édition: il y a 1 mois 4 jours par tpartner.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours - il y a 1 mois 4 jours #188834 par ChrisMcD
Thanks for reply Tony. I saw another suggestion which appears to be similiar to your method. Suggest putting the below, in the source code of a free text box. I assume you leave the box blank, and it it populates with the datetime. ITried the code, but when I export the repsonses, the box was blank.


<script type="text/javascript" charset="utf-8">	
	$(document).ready(function(){
		if($('#question{QID} input.text').val() == '') {
			$('#question{QID} input.text').val(new Date().getTime());
		}
	});
</script>

Actually I checked and I think it might have been one of your old posts lol
Dernière édition: il y a 1 mois 4 jours par ChrisMcD. Raison: more info

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 4 jours #188836 par holch
Did you hide the question? If so, how?

Always try with the question not hidden first and see what happens. Only when that works, hide the question.

If you hide the question via the GUI (the feature you mentioned before - "Always hide question"), it does not appear in the source code of the questionnaire at all and the JS funcion can not write into it. So for using javacript, you'll need to hide the question via CSS, as Tony described above.

However, if you use the approach via Expression Manager, you can hide the question via GUI, because Expression Manager can still write to the question, even if it is not in the html code of the displayed questionnaire.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 jours #188844 par tpartner
Also, I think you may want to remove the .getTime() function. That will give you epoch time, not a date.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 jours #188853 par DenisChenu
Unsure, mus be checked but i think you can use (for group 1 here)

1. A text question startTimeG1 (hidden by attribute)
2. A text question lastTimeG1 (hidden by attribute)
3. An equation question setTimeG1 (hidden by attribute)

Equation can be
{startTimeG1=if(is_empty(startTimeG1.NAOK,date("Y-m-d H:i:s"),startTimeG1)}
{lastTimeG1=date("Y-m-d H:i:s")}

startTimeG1 get the 1st seen time
lastTimeG1 get the last seen time (just a microseconds after).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
An error happen ? Before make a new topic : remind the Debug mode .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 jours #188857 par ChrisMcD
Hi Tony

The code still doesnt seem to populate a date/time in the response field. The question is hidden and doesnt appear to give any errors.

Any other ideas ?
<script>
	$(document).ready(function(){
		if($('#question{QID} input.text').val() == '') {
			$('#question{QID} input.text').val(new Date().getTime());
		}
      {
     $('#question{QID}').hide();
  }
	});
</script>

Thanks for the help

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 3 jours - il y a 1 mois 3 jours #188876 par tpartner
Try this:

<script>
	$(document).ready(function(){
if($('#question{QID} input:text:eq(0)').val() == '') {
			$('#question{QID} input:text:eq(0)').val(new Date());
		}
      {
     $('#question{QID}').hide();
  }
	});
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Dernière édition: il y a 1 mois 3 jours par tpartner.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 jours #188887 par ChrisMcD
Perfect Tony ! That's exactly what I was looking for.

Many thanks for your help and hard work, you guys are doing fantastic job supporting the community !

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 jours - il y a 1 mois 2 jours #188892 par ChrisMcD
I forgot to also post (for anyone in the future looking to do the same). This only appears to work when selecting a question "Short Free Text" I initially had it as "Long Free Text" which didn't work.
Dernière édition: il y a 1 mois 2 jours par ChrisMcD. Raison: moe info

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!