timestamps in questions. it wont work... :((

More
6 years 1 month ago #61042 by ikojck
ikojck created the topic: timestamps in questions. it wont work... :((
Hi,

i want to add a timestamp to my question groups and i found some solutions. But, as i tried them none of them will work. i cant understand where the problem is as i am doing everything right, or am i forgetting something??!
i followed the instructions on both solutions that i found and i tested my survey for javascript and its enabled. but the timer still wont work.
its really urgent as i am doing my bachelor thesis at the moment.

Thank you!

1st. solution

www.aptigence.com.au/home/archives/28-Re...sing-LimeSurvey.html

2nd. solution

docs.limesurvey.org/Workarounds:+Manipul...cord_group_view_time

Please Log in to join the conversation.

More
6 years 1 month ago #61044 by holch
holch replied the topic: timestamps in questions. it wont work... :((
Well, what does not work? What is the result of your efforts?

Is there nothing written into the text field?

Did you set the right questionid?

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

Please Log in to join the conversation.

More
6 years 1 month ago - 6 years 1 month ago #61057 by ikojck
ikojck replied the topic: timestamps in questions. it wont work... :((
in the end as i export my survey with the data i get "1980-01-01 00:00:00" for the timer. wich shouldnt be, i think!

what do you mean in the text field?? which text field, where? the text field of the question is empty before an after the completion of the survey. :(
and how else can i see the timer results?

I set as questionid the id of the question which has the javascript for the timestamp in its source section.is it correct? or should the question id be the id of the actual question in the group which the participants see and not the timestamp question which they dont see?

and which solution do you have in mind? the short or the long version?

because the short one is in the source of the help section of the question but the long one is in the question's source its self.

which should i use i how do i get it right?


P.S. I want there to be several groups with timestamps. and each group will have only two question - the timestamp question and the normal question which the user sees.
where do i place the javascript in the timestmap question or in my actual question which the user sees??

also, in the short solution its said that the visibility of the timestamp question should be hidden. but the long solution doesnt say anything about it. i dont know which is right?

1.Set up your survey to use JavaScript.
2.In the group, create a short-text question. We will hide this later with JavaScript and populate it with the elapsed time.
3.Place the following script in the source of the short-text question.
4.Replace "QQ" in line 6 with the ID of the short-text question.

The "hide" here is meant as hide the question or hide the short-text field of the question??
Last Edit: 6 years 1 month ago by ikojck.

Please Log in to join the conversation.

More
6 years 1 month ago #61059 by holch
holch replied the topic: timestamps in questions. it wont work... :((
Well, those are two different tutorials and seems like one is older than the other, because the feature to hide the question from within Limesurvey is only available in newer versions.

I was talking about the text field where you are supposed to write the timestamp in. If later on in the database there is written "1980-01-01 00:00:00", then this means that there has been written something into your hidden text field (or are you referring to the standard timestamp already provided by limesurvey for the whole survey?).

But unfortunately it is writing the wrong thing into the text field.

I am not an expert in Javascript nor have I ever used this workaround. What I would do is the following:
- Create the question group with the two questions
- I wouldn't hide the text question which is supposed to receive the info of the timestamp yet.
- Then I would use the javascript from the tutorial to fill this text field. If the textfield doesn't get filled, something is going wrong. You can also see whether the timestamp is correct.
- Only when the right time is written into this text field I would check what appears in the database. If that is correct I would hide the text question.

I am not sure where the Javascript belongs. I would write it into the first question on the page.

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

Please Log in to join the conversation.

More
6 years 1 month ago #61063 by tpartner
tpartner replied the topic: timestamps in questions. it wont work... :((
METHOD 1
The first (shorter) workaround simply populates a hidden question with a timestamp of when the group is viewed for the last time.

I think, though, that this workaround may not work because hiding the hidden question with the 'Always hide this question' advanced setting prevents it from being included in the DOM which means that it is inaccessable by JavaScript. I think this question should be hidden with CSS or JavaScript.

METHOD 2
The longer workaround records a total time that the group was viewed, even if a respondent leaves and returns to the group.

To test, you can leave the hidden question visible. Change:
$('#question'+timeQID).hide();
To:
//$('#question'+timeQID).hide();

I want there to be several groups with timestamps

Both workarounds can be applied to as many groups as you like.

also, in the short solution its said that the visibility of the timestamp question should be hidden. but the long solution doesnt say anything about it. i dont know which is right?

In the second workaround the question is hidden with JavaScript (see testing above).

The "hide" here is meant as hide the question or hide the short-text field of the question??

Hide the whole timer question.

where do i place the javascript in the timestmap question or in my actual question which the user sees??

JavaScript can be place in the question source or the help source of any question on the page.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
6 years 1 month ago #61064 by ikojck
ikojck replied the topic: timestamps in questions. it wont work... :((
Hi,

thanks very much! I figured it out at the end!

:)

Please Log in to join the conversation.

More
6 years 1 month ago #61065 by ikojck
ikojck replied the topic: timestamps in questions. it wont work... :((
thanks to the lime survey team as well! its working now! :)

Please Log in to join the conversation.

More
5 years 4 months ago #73556 by hammannk
hammannk replied the topic: timestamps in questions. it wont work... :((
Hello!

First of all thank you for your help, the second method (longer one) works fine! But is it right that I get only the seconds not the milliseconds the user sees the page? And is there a possibility that I can change the script to see milliseconds as well?

Thanks!

Please Log in to join the conversation.

More
5 years 4 months ago #73557 by Mazi
Mazi replied the topic: timestamps in questions. it wont work... :((
I just checked the technical details: At the database the value is store with miliseconds and when exporting results e.g. to MS Excel, these miliseconds are exported as well. Only at the browse response screen, this seems to be rounded.
I'm not sure what you would need miliseconds for, but you can file a ticket at our Bugtracker, asking to show the total value at the browse response screen instead of the rounded one.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 4 months ago #73558 by hammannk
hammannk replied the topic: timestamps in questions. it wont work... :((
Great! I didn't need to see the milliseconds, I just wondered if they would be recorded and just wanted to export them as well... thanks a lot!

Please Log in to join the conversation.

More
5 years 4 months ago #73586 by Mazi
Mazi replied the topic: timestamps in questions. it wont work... :((

hammannk wrote: Great! I didn't need to see the milliseconds, I just wondered if they would be recorded and just wanted to export them as well... thanks a lot!

You're welcome :-)

If our hints have been helpful and you enjoy limesurvey please consider a donation to the team .
We do all this in our free time and you don't have to pay a penny for this software.

Without your help we can't keep this project alive.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
3 years 2 months ago #106779 by ermal
ermal replied the topic: timestamps in questions. it wont work... :((
Getting error "Property Survey_dynamic.datestamp is not defined." when taking survey, after the welcome screen.


anyone knows how to disable datestamps. where is it located in settings???

Please Log in to join the conversation.

More
3 years 2 months ago #106780 by holch
holch replied the topic: timestamps in questions. it wont work... :((
manual.limesurvey.org/Creating_a_new_survey (search for datestamp):

Survey Settings -> Notification & data management -> Date stamp

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

Please Log in to join the conversation.

More
3 years 2 months ago #106886 by DenisChenu
DenisChenu replied the topic: timestamps in questions. it wont work... :((
I think Date stamp can not be updated when survey is active.

Hre : did you update manually your DB ?

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

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now