Welcome to the LimeSurvey Community Forum

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

Use Expression Manager to show a results table

More
10 years 9 months ago - 10 years 9 months ago #97068 by rom
Hey Experts,

TLDR; Is there any Variable I can use to print out the Display-Value of an answer option, something like Q0001.A1.shown?
Are there Variables to show the amount of relevant questions in this survey, and the amount of relevant questions the user interacted with?

Background: We are planning to use LimeSurvey for a monthly Quiz Setup. My goal is to prepare a survey template, and fill in all the complicated Expression Manager stuff so that some other users (aka Quiz Managers) do not need to learn about Expression Manager Syntax just to fill in their questions/answers.

All questions will be Radio Lists, 4 Answer Options (A1-A4). I will set the questions to randomize the Answer order, and tell the Quiz Managers to place the CORRECT Answer always into the first Answer Option (A1).

The last Question Group should contain a table which tells the users their test result. Current Layout:
Code:
<strong>Score:</strong>{Q0005}<br />
<table>
<tr>
<td>Question</td>
<td>Your answer</td>
<td>Correct answer</td>
</tr>
<tr> 
<td>{(Q0001.qseq+1)}. {Q0001.question}</td>
<td>{Q0001.shown}</td> 
<td>{Q0001.A1.shown}</td>
</tr>

The Score is calculated using an Equation Question Type
sum(Q0001 == 'A1', Q0002 == 'A1', Q0003 == 'A1', Q0004 == 'A1')

I have 2 questions:

1. Is it possible to show the Value for the Correct Answer (A1)? The Code Q0001.A1.shown does not work, and is used as an example.

2. Are there variables for the amount of displayed questions (=Total relevant questions in this survey) and for the amount of answered questions (=Every RELEVANT question the user interacted with)?
Last edit: 10 years 9 months ago by rom. Reason: spelling
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 9 months ago #97073 by DenisChenu
Replied by DenisChenu on topic Use Expression Manager to show a results table
For relevance : use .relevantStatus ( manual.limesurvey.org/Expression_Manager )

For Question answer : don't think it work but try Q0001_A1.shown . If it don't work : put a feature request (or pull a patch on github).

Denis

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: rom
The topic has been locked.
More
10 years 9 months ago #97127 by rom
relevance.Status works for me.
Tried already Q0001_A1.shown, this does not work for Radio Lists. Will put a feature request.

Thanks so far. :)
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 9 months ago - 10 years 9 months ago #97129 by DenisChenu
Replied by DenisChenu on topic Use Expression Manager to show a results table

rom wrote: Tried already Q0001_A1.shown, this does not work for Radio Lists. Will put a feature request.

Think there are no solution actually to have answer text.

For question text, you can use QQ.question : but we can not have QQ.question for array (only QQ_SQ1.question).

You have to update manually the "Q0001_A1.shown".

Denis
PS: another possibility is to use some Équation question type at start of survey.
This équation take the good answers (for example EQ_Q1}.
In the "single choice", you put {EQ_SQ1} for the good answer
AT end you use The good answer are {EQ_SQ1}

Then you have one place for all good question.

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.
Last edit: 10 years 9 months ago by DenisChenu.
The topic has been locked.
More
10 years 9 months ago - 10 years 9 months ago #97132 by rom
thats why I am going to add it as a feature request. actually, I think the planned function "getAnsOption(X,Y)" ( see here ) might already be the function I need. But I am not sure, the meaning is quite complicated.
Last edit: 10 years 9 months ago by rom. Reason: ups
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 9 months ago #97148 by DenisChenu
Replied by DenisChenu on topic Use Expression Manager to show a results table

rom wrote: thats why I am going to add it as a feature request. actually, I think the planned function "getAnsOption(X,Y)" ( see here ) might already be the function I need. But I am not sure, the meaning is quite complicated.

Think it's that.

Put the link to feature request here after :).

Denis

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 topic has been locked.
More
10 years 9 months ago #97153 by rom
Sure thing, thanks again for your help. :)

bugs.limesurvey.org/view.php?id=7939
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose