Welcome, Guest
Username: Password: Remember me

TOPIC: Restarting a Survey breaks logic and workflow for pre-populated answers

Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67298

We've now gone live (V1.91 Build 11026) and I noticed that some of the 1500 responses so far don't have some of the required fields that are pre-populated from another site.

The workflow is as follows:
1) participants log into a members area one one site
2) If the choose to fill out the questionnaire, some of their details (memberId, DOB, Age and Country of birth) are passed via the URL to the Questionnaire (site)
3) Both memberId, and Age are hidden fields
4) if they continue and complete the questionnaire, everything works as expected

However, if they choose to restart the questionnaire for some reason and clear their response, they get to the page that informs them that their answers were cleared, but when the click on the Restart link, they go straight back into the Survey, only this time without any of the required parameters. For DOB and Country of origin that's not a problems as these fields are visible, but the other two fields are the real problem as they are not displayed, but the memberId is the only thing that allows us to link the questionnaire back to the actual members).

I have two questions.

1) is there a way of redirecting the restart to the member site so that all relevant and needed info is picked up? I've hacked the text in replacements.php to at least indicate to our members that they need to go back through the member site if they want to restart the survey


2) Given that both the memberID and the Age a mandatory, why is this not enforced? i guess its because of the fact that it's hidden.

Thanks,
The administrator has disabled public write access.

Re: Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67307

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
The describes scenario is somewhat technically intended behavior because when clearing the answers, they are gone and when starting the survey using a different link, no survey details are passed.

@1: You can remove the "clear answers" placeholders from your template.

@2: It's because of the fact that they are hidden and because under some circumstances no data is pased by URL if they use a different link.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67339

Yes, I understand the intended behaviour, but maybe we should add a section in the documentation to ensure everybody understands what may happen with a scenario like ours.

I have one more question, though.

We are happy for the users to clear their answers, but just need a clean way so they cannot restart the survey from that link. I tried to get rid of that href but that broke things. As I said, I've change the text to indicate that they have to go back to the original site to restart, but if they click on the link they can still start it (and loosing the data that we use to identify their details in the members DB)

Cheers,
The administrator has disabled public write access.

Re: Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67340

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
lister171254 wrote:
Yes, I understand the intended behaviour, but maybe we should add a section in the documentation to ensure everybody understands what may happen with a scenario like ours.
If you are missing some information in the manual feel free to improve it. Our manual is a wiki, everyone can edit it and you can't do much wrong.
So if you miss anything in the manual and you found out how to do it please add this information. Thanks!

About the second issue: There is not much you can do. Only solution I can think of (because I have coded such a script before) is to code a customized script which - from a workflow point of view - is put before the survey. That script reads out the passed parameters and then passes them to the survey which is called directly afterwards. If the script detects that no parameters were passed, it can show a warning and stop the redorection to the survey.
You then onmly have to change the link to the survey so it points to the new script.

This has to be coded but I think it will work fine.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.

Re: Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67348

Ok, will update the doc.

Just to clarify, other than the script, you cannot think of another way of stopping users from restarting the survey (i.e modifying the last page to not show the restart)

Cheers,
The administrator has disabled public write access.

Re: Restarting a Survey breaks logic and workflow for pre-populated answers 2 years 10 months ago #67357

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5324
  • Thank you received: 294
  • Karma: 249
lister171254 wrote:
Just to clarify, other than the script, you cannot think of another way of stopping users from restarting the survey (i.e modifying the last page to not show the restart)
Ohhh, you can modify the template to get rid of that message. At the "save" page have a look at the "save.pstpl" section where you should find something like:
"<span class="return-to-survey">{RETURNTOSURVEY}</span>"

Simply delete that.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.116 seconds
Donation Image