0 votes
in SoSci Survey (English) by s216103 (120 points)
edited by SoSci Survey

Dear SoSci Survey Team,

I am conducting a study with two measurement points four weeks apart from each other. To do so I created one questionnaire ("qnr4") with an interruption page after part 1 of the questionnaire that contains the PHP code with the function mailResume() .The email templates I use to send the invitation and reminder to the second part of the survey via the function mailResume() have the ID number 3 and 4.

My PHP Code:

// The time of the first call of the breaker page is stored in variable $timepart1
// isset() and registerVariable() prevent that this time is changed when the page is called again (e.g. reloading the page) and/or that emails are scheduled twice
if (!isset($timepart1)) {
  // sve time
  $timepart1 = time();
  registerVariable($timepart1);
 
// Send invitation mailing with ID 3 at the second measurement point
  mailResume(value('AA02'), 3, strtotime('+4 weeks'));
 
// Send first reminder mail with mailing ID 4
  mailResume(value('AA02'), 4, strtotime('+5 weeks'));
}

// Check how much time has passed since the page was first accessed
if ((time() - $timepart1) < 7* 24* 3600) {
  // Show breaker page if it is less than 7 days,
  // so that participants cannot see the questions of the second measurement time point earlier.
option('resume', true); // No indication that the interview will be continued
option('nextbutton', false); // Hide next button (pause interview)
text('AA11');;  // Possibly show a farewell to the first questionnaire part
} else {
// If the participant has returned after 7 days and thus the current time minus the new time variable
// is greater than 7 days, then the survey continues on the next page
  goToPage('next');
}

Since I was unsure how to set a survey with 2 measurement points I initially created 2 questionnaires (part 1 "QNT_T1" and part 2 "QNT_T2") of the same survey, in the same project and I was afraid to delete information from the project so I did not deleted the questionnaires, therefore QNT_T1 and QNT_T2 are still stored in the project but they are not accesible to participants through the survey link, since I set the single interrupted questionnaire "qnr4" as default questionnaire.

My survey is currently online and participants have completed the first part of the "qnr4" questionnaire. A first person participating in my survey (qnr4) got the email "Invitation T2- Invitation study" (ID3) with a link for the second part after 5 minutes by mistake beacuase I forgot to change the PHP code I set during the test phase. I changed the mistake in the time from 5 min. to 4 weeks and everything was fine. The rest of the participants still do not get the invitations since the criteria of the mailResume function "strtotime('+4 weeks')" is not yet met. Nevertheless the link that first participant got by mistake still seems to work and allows her to resume the questionnaire (qnr4) correctly in the page corresponding to the second part of the questionnaire(qnr4).

Today I checked the "invitation mailings" settings again and I spotted that the email templates "Invitation T2- Invitation study" (ID3) and "Reminder T2- Reminder study" (ID4) show beside the title of the email the label "(Questionnaire: QNT_T2)" and under the title of the email tamplates stands "48 emails to resume interview"
If I go to the settings of the email tamplates -> "Questionnaire URL" is set to the option "Questionnaire: QNT_T2"

My questions are...

  1. Why do the emails (ID3 and ID4) that are to be sent to the current 48 other participants show the label (Questionnaire: QNT_T2) and the first participant got an email with a working link to resume questionnaire "qnr4" if she theoretically got email ID3 but just sooner? If the label currently says "QNT_T2" shouldn't the first person have recieved the link to QNT_T2 insteat to be able to resume questionnaire qnr4)?
  2. Is this becasue I set the questionnaire "qnr4" as default questionnaire?
  3. Can I change the settings of the email tamplates while the survey is online and the (currently 48) participants that are shown as pending for the invitation to the second part of the survey will still get a link that allows them to resume in the correct page of questionnaire "qnr4" or data might be lost?

    4.If I can change the settings of the email templates while the survey is active without issue, which option should I choose to ensure participants return to the correct page of Questionnaire [qnr4]? Currently a drop down list in the email settings "Questionnaire URL" is displayed with the options "Default Questionnaire [qnr4]" and "Questionnaire [qnr4]"

Thanks Soscy Survey team for your support and amazing work!

1 Answer

0 votes
by SoSci Survey (327k points)

>Nevertheless the link that first participant got by mistake still seems to work and allows her to resume the questionnaire (qnr4) correctly in the page corresponding to the second part of the questionnaire(qnr4).

The mailResume() function will send a link to the current interview - that is always valid and working. However, you can control this line of code:

if ((time() - $timepart1) < 7* 24* 3600) {

It will not let the person pass unless 7 days have passed since the person got there the first time.

I spotted that the email templates "Invitation T2- Invitation study" (ID3) and "Reminder T2- Reminder study" (ID4) show beside the title of the email the label "(Questionnaire: QNT_T2)" and under the title of the email tamplates stands "48 emails to resume interview"

This seems to correspond to your PHP code. You code tells SoSci Survey to send two emails, one after 4 weeks and another one after 5 weeks.

Why do the emails (ID3 and ID4) that are to be sent to the current 48 other participants show the label (Questionnaire: QNT_T2)

You probably selected that qustionaire in the "questionnaire link" tab of the mailing (you can change it there, if you like). However, this is relevant for mailSchedule() only, the links sent via mailResume() will always refer to the current interview, no matter what questionnaire was used for that.

Currently a drop down list in the email settings "Questionnaire URL" is displayed with the options "Default Questionnaire [qnr4]" and "Questionnaire [qnr4]"

Is stated above, it will not matter at all for mailResume(). If you had used mailSchedule(), the only difference would be this: When you selected "Default Questionnaire" and then changed the default, than the new default would be used (same as if you clicked the link to your surve project), while it would always be qnr4, if you explicitly selected that one.

by s216103 (120 points)
thank you so much for your prompt response! If I change the conditional part of the PHP from 7 days to 21 days (3 weeks) while the survey is ongoing, will this affect in any way the linkt that will be sent to the participants to take part in the second part of the survey after 4 weeks since their first participation?

I would change it to:

if ((time() - $timepart1) < 21* 24* 3600) {
by SoSci Survey (327k points)
This code (along with the subsequent functions) will only make sure that nobody gets to the next page before 21 days have passed. It does nothing else, it especially has no effect on the emails in any way.

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

...