Welcome, Guest
Username: Password: Remember me

TOPIC: Use Expression Manager to show a results table

Use Expression Manager to show a results table 1 year 5 months ago #97068

  • rom
  • rom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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:
<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: 1 year 5 months ago by rom. Reason: spelling
The administrator has disabled public write access.

Use Expression Manager to show a results table 1 year 5 months ago #97073

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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
The administrator has disabled public write access.
The following user(s) said Thank You: rom

Use Expression Manager to show a results table 1 year 5 months ago #97127

  • rom
  • rom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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 administrator has disabled public write access.

Use Expression Manager to show a results table 1 year 5 months ago #97129

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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.
Last Edit: 1 year 5 months ago by DenisChenu.
The administrator has disabled public write access.

Use Expression Manager to show a results table 1 year 5 months ago #97132

  • rom
  • rom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
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: 1 year 5 months ago by rom. Reason: ups
The administrator has disabled public write access.

Use Expression Manager to show a results table 1 year 5 months ago #97148

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
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
The administrator has disabled public write access.

Use Expression Manager to show a results table 1 year 5 months ago #97153

  • rom
  • rom's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 14
  • Thank you received: 1
  • Karma: 0
Sure thing, thanks again for your help. :)

bugs.limesurvey.org/view.php?id=7939
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.161 seconds
Donation Image