0 votes
in SoSci Survey (English) by s091686 (150 points)

Is there a way to keep the email active for a certain period of time? For example, I wish to send four questionnaires out a day, each being active for one hour. Each of these questionnaires will be sent two hours apart from each other. I have played around with limit validity in the mailing settings but this hasn't changed anything many thanks

1 Answer

0 votes
by SoSci Survey (312k points)

So you have a fixed time when each questionnaire is sent out?

They you can simply add a time limit to your questionaire:

if (time() > strtotime('2018-05-15 20:00:00')) {
  buttonHide();
  text('too_late');
  pageStop();
}

If the time is not fixed, you may have to work with the MAILSENT variable which, however, is either unavailable or rounded if your email addresslist is not personalized, but pseudonymous or anonymous.

by s091686 (150 points)
Thanks for your reply, where must I write this however?
by SoSci Survey (312k points)
Whereever you like the screenout. I'd place it as first element (PHP code, see https://www.soscisurvey.de/help/doku.php/en:create:php) on the first questionnaire page. But you can be nasty and tell them it's too late on the very last page of the questionnaire ;)
by s091686 (150 points)
I'm sorry, I am still having troubles.
I wish to administer a questionnaire 4 times a day with each questionnaire being open for two hours.
I have used your php code and changed 'too_late' for SP, but I am getting the following error. 'There is no text with the ID SP in this survey project'. The questionnaire is State Personality with the ID SP.

Do I need a text that states that the questionnaire is no longer active?
by s091686 (150 points)
What for example would be the code for deactivating the questionnaire on the 18th May 2018 at 08:00?
by SoSci Survey (312k points)
Please open a section in your list of questions and then "add text". This text will have a 4 character ID.

> each questionnaire being open for two hours.

The function strtotime() will also support something like strtotime('16:00:00') - means 16:00 the current day.

> What for example would be the code for deactivating the questionnaire on the 18th May 2018 at 08:00?

if (time() > strtotime('2018-05-18 08:00:00')) {

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...