Reading possible choises from cvs file

More
1 year 1 month ago #191567 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.

Note: If I asked something and forgot to say version, I am using LS 4.x.
The topic has been locked.
LimeSurvey Partners
More
1 year 1 month ago - 1 year 1 month ago #191568 by jelo

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: 1 year 1 month ago by jelo.
The topic has been locked.
More
1 year 1 month ago #191569 by tpartner
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.
Official LimeSurvey Partner - partnersurveys.com
The topic has been locked.
More
1 year 1 month ago #191570 by Jmantysalo

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.

Note: If I asked something and forgot to say version, I am using LS 4.x.
The topic has been locked.
More
1 year 1 month ago #191571 by jelo

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.
More
1 year 1 month ago #191592 by Jmantysalo

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.


Note: If I asked something and forgot to say version, I am using LS 4.x.
The topic has been locked.
More
1 year 1 month ago #191593 by Jmantysalo

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.

Note: If I asked something and forgot to say version, I am using LS 4.x.
The topic has been locked.
More
1 year 1 month ago #191602 by holch

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.
More
1 year 1 month ago #191669 by DenisChenu

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.

Start now!

Just create your account and start using Limesurvey today.

Register now