Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Use Expression Manager to show a results table

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97068

  • rom
  • roms Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 14
  • Dank erhalten: 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)?
Letzte Änderung: 1 Jahr 2 Monate her von rom. Begründung: spelling
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97073

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6256
  • Dank erhalten: 799
  • Karma: 239
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Folgende Benutzer bedankten sich: rom

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97127

  • rom
  • roms Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 14
  • Dank erhalten: 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. :)
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97129

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6256
  • Dank erhalten: 799
  • Karma: 239
rom schrieb:
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.
Letzte Änderung: 1 Jahr 2 Monate her von DenisChenu.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97132

  • rom
  • roms Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 14
  • Dank erhalten: 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.
Letzte Änderung: 1 Jahr 2 Monate her von rom. Begründung: ups
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97148

  • DenisChenu
  • DenisChenus Avatar
  • OFFLINE
  • Moderator Lime
  • Beiträge: 6256
  • Dank erhalten: 799
  • Karma: 239
rom schrieb:
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
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Use Expression Manager to show a results table 1 Jahr 2 Monate her #97153

  • rom
  • roms Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 14
  • Dank erhalten: 1
  • Karma: 0
Sure thing, thanks again for your help. :)

bugs.limesurvey.org/view.php?id=7939
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.209 Sekunden
Donation Image