Welcome to the LimeSurvey Community Forum

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

Show answers on assessment

More
7 years 1 month ago - 7 years 1 month ago #149321 by Ben_V
Replied by Ben_V on topic Show answers on assessment

paulhazelwood wrote: I would like it to also display the answer that they selected. Can this be done.


manual.limesurvey.org/Expression_Manager...efits_of_using_EM.3F

Use ".shown" variable attribute (suffix)
{Q1.shown}
{Q2.shown}
etc.

Code:
<table cellpadding="5" >
  <thead>
    <tr>
      <th> Question </th>
      <th> Your answer </th>
      <th> Correct answer </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td> {Q1.question} </td>
      <td> {Q1.shown} </td>
      <td> {if (Q1 == 'A2' , '<font color=green>Correct</font>' , '<font color=red>Incorrect</font>')} </td>
    </tr>
    <tr>
      <td> {Q2.question} </td>
      <td> {Q2.shown} </td>
      <td> {if (Q2 == 'A2' , 'Correct' , 'Incorrect' )}</td>
    </tr>
    <tr>
      <td> {Q3.question} </td>
      <td> {Q3.shown} </td>
      <td> {if (Q3 == 'A2' , 'Correct' , 'Incorrect')} </td>
    </tr>
  </tbody>
</table>

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Last edit: 7 years 1 month ago by Ben_V.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 3 months ago #178771 by tammo
Replied by tammo on topic Show answers on assessment
Still, I keep struggling with this.

I use radio questions.

I would like to show the correct answer in the case the respondent gave the false answer.

Would I need to hard code the correct answer or can I in any way show the correct answer by calling it's code? The correct answer always has code C.

See attached survey:

File Attachment:

File Name: limesurvey...4695.lss
File Size:15 KB


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178772 by tpartner
Replied by tpartner on topic Show answers on assessment
An alternative may be to place the answer text in an equation question and then reference that in both the radio answer and your text.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
5 years 3 months ago #178774 by tammo
Replied by tammo on topic Show answers on assessment
Since I have many questions in this test, I am looking for a way to refer to the correct answer by pulling it from the question itself, referring to the answer option that has code "C". Would that be possible?

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 3 months ago #178782 by DenisChenu
Replied by DenisChenu on topic Show answers on assessment
Single choice ? I don't think …

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.

Lime-years ahead

Online-surveys for every purse and purpose