Welcome, Guest
Username: Password: Remember me

TOPIC: Question Code updates

Question Code updates 6 months 2 weeks ago #105957

  • LSCitizen
  • LSCitizen's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 38
  • Karma: 0
I am currenty using LimeSurvey: Version 2.05+ Build 140226.

I have imported a survey from an instance of LimeSurvey using Version 1.92+ Build 120620.
When I imported the survey, all of the question codes that uses an underscore (_) were changed.

Is there a way to prevent this from happening? I have attached a screenshot.
Attachments:
The administrator has disabled public write access.

Question Code updates 6 months 2 weeks ago #105964

  • c_schmitz
  • c_schmitz's Avatar
  • NOW ONLINE
  • LimeSurvey Team
  • Posts: 779
  • Thank you received: 111
  • Karma: 92
No, I am sorry but you cannot prevent this from happening.
Support us, too. Donate to the LimeSurvey project and help keep us going!
The administrator has disabled public write access.

Question Code updates 6 months 1 week ago #106137

  • LSCitizen
  • LSCitizen's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 38
  • Karma: 0
Why has this changed?
The administrator has disabled public write access.

Question Code updates 6 months 1 week ago #106167

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4193
  • Thank you received: 788
  • Karma: 359
Underscores are no longer allowed in question/sub-question codes because they cause problems in Expression Manager because it uses underscores to connect questions subquestion and answers in variable names.


.
Cheers,
Tony Partner

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

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Question Code updates 6 months 1 week ago #106214

  • rvenkat
  • rvenkat's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 42
  • Thank you received: 1
  • Karma: 2
Does this mean existing surveys with underscores in question codes have to be changed.
If so, that's a bit of pain when there are conditions.


RV
The administrator has disabled public write access.

Question Code updates 6 months 1 week ago #106319

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Just to be clear, Expression Manager doesn't have any trouble with underscores -- it has supported them just fine since 1.92.

Rather, it appears that the team was concerned that users could accidentally generate duplicate variable names (since questions types with sub-questions have variable names that are auto-created as a combination of the question code plus and underscore plus the sub-question code; and this could conflict with explicitly created variable names for other types of questions if underscores are allowed). The Show Survey Logic File has explicitly shown cases where questions contain duplicated question codes (by surrounding them with a pink box, and including tool-tips that refer you to the duplicate question) since 1.92, but it appears that the team did not feel that was an adequate solution.

The newer versions of 2.05+ do attempt to remove underscores from variables during upgrade, but the team could use some help from the community to improve the robustness of that process. If you have surveys with underscores in the variable names, you should explicitly check the accuracy of array_filter, array_filter exclude, and other non-question text blocks that use those variables, since the upgrade process does not currently address those aspects of the survey. You should also check that the removal of the underscores during upgrade did not cause other variable names to now clash. The Show Logic File will help you identify and fix such issues.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.147 seconds
Donation Image