Welcome to the LimeSurvey Community Forum

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

Show how often a question was answered correctly in the statistics.

  • mariaa
  • mariaa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 2 months ago - 5 years 2 months ago #180944 by mariaa
Dear all :)

I´ve created a quiz and for each answer I´d like to see in the statistics how often it was answered correctly and how often incorrectly.

I already successfully created a code that shows the participant weather he answered correctly or not directly after having answered the question.

Let´s have a look at this exemplary question:

Attachment not found



This is the code:
Code:
{if(A3_SQ001.NAOK=="A1" AND A3_SQ002.NAOK=="A1" AND A3_SQ003.NAOK=="A2" AND A3_SQ004.NAOK=="A2" AND A3_SQ005.NAOK=="A2","You answered correctly.","")}   {if(A3_SQ001.NAOK=="A1" AND A3_SQ002.NAOK=="A1" AND A3_SQ003.NAOK=="A2" AND A3_SQ004.NAOK=="A2" AND A3_SQ005.NAOK=="A2","","Incorrect. Statements no. 1 and 2 are correct.")}


But in this case it´s not possible to see how many times the question has been answered correctly or incorrect in the statistics. I just see how many times the question was answered since it´s always the same text block that is popping up.

An approach would be to create two text boxes. The first should just pop up in case that the question has been answered correctly and the second text box in case that the question has been answered incorrect. This would make it possible to see how often the question has been answered correctly and incorrect.

But unfortunately I don´t know how to adjujust the syntax for the two text boxes. The first should pop up in case that all 5 statements have been answered correctly, the second if at least 1 question has been answered false.

In each case the text block should just pop up after the participant has answered all 5 statements.


By now I used this relevance equation to make sure that the text block is just popping up after having answered all questions but I´m not sure if it needs to be adjusted( since now in addition to this condition, the answers needs to be correct or incorrect.)

Attachment not found



What would the syntax look like for each case ("correct" and "incorrect" text block? And how do I need to adjust the relevance equations for each case ?

Please find here the question in lsg format

File Attachment:

File Name: limesurvey...2-24.lsg
File Size:4 KB


Thanks a lot for your help =)
Last edit: 5 years 2 months ago by mariaa. Reason: Attachment is not working
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 2 months ago #180947 by Joffm
Hi, maria,

I would create a hidden single question with two answer options "1= true - 2=false".
With an (also hidden) equation you set the value.

Like
{QResult=if(A3_SQ001.NAOK=="A1" AND A3_SQ002.NAOK=="A1" AND A3_SQ003.NAOK=="A2" AND A3_SQ004.NAOK=="A2" AND A3_SQ005.NAOK=="A2",1,2)}

Example: Here the result question is still visible.

Now you have a variable in the dataset with the result.

File Attachment:

File Name: limesurvey...7444.lss
File Size:21 KB


Regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: mariaa
The topic has been locked.
  • mariaa
  • mariaa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 2 months ago #180958 by mariaa
Thanks a lot! It´s working - alone, I would never have come up with this approach =)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose