Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Reading possible choises from cvs file

  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 4 months ago #191567 by Jmantysalo
Reading possible choises from cvs file was created by Jmantysalo
Let's suppose that 3000 students have taken a basic course and now continue to advanced course. Say that after "Basics of music" one can continue to "Violin", "Piano" or "Flute", after "Elementary drug usage" one can take either "Heroin" or "Cocaine" and so on. I have a list like

Alice, alice@somewhere.invalid, music
Bob, bob@otherplace.invalid, drugs
Cecilia, cecilia@address.invalid, music

and another list like

music: violin, piano, flute
drugs: heroin, cocaine

Is there an easy way to make LimeSurvey to ask about what advanced course the student will take, and only offer choises available by basic course taken? Of course this is an easy task for basic php page, but could be handy if some other questions could be asked in the same time, and then LimeSurvey is a good tool.
The topic has been locked.
More
4 years 4 months ago - 4 years 4 months ago #191568 by jelo
Replied by jelo on topic Reading possible choises from cvs file

Jmantysalo wrote: Is there an easy way to make LimeSurvey to ask about what advanced course the student will take, and only offer choises available by basic course taken?

Define easy ;-)

LimeSurvey supports no dynamic or static lists (which you would use in other survey tools to apply these lists to question types.
Featurerequest: bugs.limesurvey.org/view.php?id=11688


I would suggest using Tokens with attributes. The attributes are variables, where you could save infos about the student and the courses taken. You also define what options each student has in the future to choose from.
manual.limesurvey.org/Survey_participants

I would create a question for each course with the future options "e.g. music: violin, piano, flute" and only display the relevant once for the student, which can be controlled via ExpressionManager accessing the token attributes.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Last edit: 4 years 4 months ago by jelo.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #191569 by tpartner
Replied by tpartner on topic Reading possible choises from cvs file
You can use Evan Plaice's jquery-csv platform to convert CSV contents into JavaScript objects.

I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?

What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 4 months ago #191570 by Jmantysalo
Replied by Jmantysalo on topic Reading possible choises from cvs file

jelo wrote: Define easy ;-)


"Easier than making the form from scratch by plain php."

jelo wrote: I would create a question for each course with the future options "e.g. music: violin, piano, flute" and only display the relevant once for the student, which can be controlled via ExpressionManager accessing the token attributes.


Hmm... Can the token be handled like a string or number? If so, the token could be just of the form XXXYYYY where X-part would define possible choises and YYYY would be string to differentiate students.
The topic has been locked.
More
4 years 4 months ago #191571 by jelo
Replied by jelo on topic Reading possible choises from cvs file

Jmantysalo wrote: Hmm... Can the token be handled like a string or number? If so, the token could be just of the form XXXYYYY where X-part would define possible choises and YYYY would be string to differentiate students.

Did you read about "Survey participants and attributes"? Your question implies that you haven't. If you like to code a workaround to decipher the token into choiceoptions, fine. But you can just place the numbers/codes into a attribute field and access the attribute field inside LimeSurvey.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: holch
The topic has been locked.
  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 4 months ago #191592 by Jmantysalo
Replied by Jmantysalo on topic Reading possible choises from cvs file

jelo wrote:

Jmantysalo wrote: Did you read about "Survey participants and attributes"? Your question implies that you haven't. If you like to code a workaround to decipher the token into choiceoptions, fine. But you can just place the numbers/codes into a attribute field and access the attribute field inside LimeSurvey.


Yes, that can be done too. But there is no need if everything needed can be coded as a part of token. I think it could be easier that way.

The topic has been locked.
  • Jmantysalo
  • Jmantysalo's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
4 years 4 months ago #191593 by Jmantysalo
Replied by Jmantysalo on topic Reading possible choises from cvs file

tpartner wrote: You can use Evan Plaice's jquery-csv platform to convert CSV contents into JavaScript objects.

Thanks. Seems usefull, I'll look at that.

I don't understand the need to access the first CSV file - couldn't the basic course be placed in a token attribute?


True, it can.

What question type do you see for the advanced course(s)? I ask because you can't arbitrarily generate answers for LimeSurvey. If using list-radio or multiple-choice questions, the answers/sub-questions must be defined in the LimeSurvey GUI.[/quote]

That has not been specified yet. Probably radio button choise or dropdown.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #191602 by holch
Replied by holch on topic Reading possible choises from cvs file

I think it could be easier that way.


I don't think so. What is easier to use the possibilties that LS offers out of the box?

With your approach you would have to have custom coding to break up the token into different bits, while with the approach Jelo highlights you can just create a token table with the necessary custom attributes in columns for each respondent. These custom attributes can be used within the survey, for expressions, relevance equations, etc. and are easily accessible with {TOKEN:ATTRIBUTE_1}

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: Jmantysalo
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 4 months ago #191669 by DenisChenu
Replied by DenisChenu on topic Reading possible choises from cvs file

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: Jmantysalo
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose