Welcome to the LimeSurvey Community Forum

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

Feedback for assessment question

  • mariaa
  • mariaa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 8 months ago #180759 by mariaa
Feedback for assessment question was created by mariaa
Dear all :)

I´ve created an assessment survey with different question types (array, ranking, multiple choice with pictures etc.) In this context, I´d like to create feedback elements for each question.

I already succeeded at creating a text for each question that informs the participant whether he answered the question correctly.
Code:
<font color="#008000">{if(a456_1.NAOK=="A3" AND a456_2.NAOK=="A1" AND a456_3.NAOK=="A5" AND a456_4.NAOK=="A4" AND a456_5.NAOK=="A2","You chose answer correctly","")} </font> <font color="#FF0000"> {if(a456_1.NAOK=="A3" AND a456_2.NAOK=="A1" AND a456_3.NAOK=="A5" AND a456_4.NAOK=="A4" AND a456_5.NAOK=="A2","","Incorrect. The correct order is France, Germany, Poland, Iceland, Bosnia and Herzegowina.")} </font>

I´m still struggeling with finding a solution on how to show this text at the right time.

By now the feedback text is already popping up before the participant clicked the "next" button.
This version is very error prone because the participant could change his answer again before clicking on the next button because he already gets the correct solution displayed.




I´d like to show the feedback on the same page as the respective question , directly below the question after the participant clicked the "next" button ((like in the picture attached below).
Because for a helpul feedback, the participant should still be able to see which answers he has selected (or in this example his solution of the ranking task).





Do you know how this is possible? Do I need to adjust/extend my code?

Thanks a lot for your ideas and your support :) :)


PS: I know that it might be a solution to sum up all feedback and show the prospective answers on a summary page in the end of the survey but I´d prefer to give feedback directly on the same page of each question if somehow possible.


Please find below the survey. This might be helpful.




Many thanks in advance


Mariaa
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #180761 by tpartner
Replied by tpartner on topic Feedback for assessment question
No survey attached, but try this:

Code:
<font color="#008000">{if(a456_1.NAOK=="A3" AND a456_2.NAOK=="A1" AND a456_3.NAOK=="A5" AND a456_4.NAOK=="A4" AND a456_5.NAOK=="A2","You chose answer correctly","")} </font> <font color="#FF0000"> {if(count(a456_1.NAOK, a456_2.NAOK, a456_3.NAOK, a456_4.NAOK, a456_5.NAOK) == 5 AND a456_1.NAOK != "A3" AND a456_2.NAOK != "A1" AND a456_3.NAOK != "A5" AND a456_4.NAOK != "A4" AND a456_5.NAOK != "A2","","Incorrect. The correct order is France, Germany, Poland, Iceland, Bosnia and Herzegowina.")} </font>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • mariaa
  • mariaa's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 8 months ago - 5 years 8 months ago #180767 by mariaa
Replied by mariaa on topic Feedback for assessment question
Hi Tpartner,

Thanks a lot for your code :)

I´m sorry, I should have mentioned that I had already set the relevance equation to this value in my example:
count(a456_1, a456_2, a456_3, a456_4, a456_5) == 5



So it already works that the feedback field only appears when the participant completely finished the ranking.
Nevertheless, after having seen the feedback, he can still cheat and change the ranking order before clicking on the next button, which I´d like to avoid.

I did check on your code. There is no error message shown but the feedback field already aplies before clicking the next button .



Do you know how I need to adjust the code (or the relevance equation) so that it´s working?

Thanks a lot for your precious support.:)
Last edit: 5 years 8 months ago by mariaa. Reason: Error about the pictures
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #180798 by tpartner
Replied by tpartner on topic Feedback for assessment question

Nevertheless, after having seen the feedback, he can still cheat and change the ranking order before clicking on the next button, which I´d like to avoid.


The only way to do that without significant JavaScript would be to place the feedback message in a following group.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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 8 months ago #180815 by mariaa
Replied by mariaa on topic Feedback for assessment question
Hi Tpartner,

thanks a lot! In this case, I´ll come back to the solution of creating an overview pace at the end of the survey. I found out that I can show the selected answers (for single choice) by using this command for question a34: {a34.shown}. But in case that the answers are pictures (see below) this is not working.


In this case, there is just the code of the picture shown instead of the picture itself.


Code:
<img alt="" src="/upload/surveys/575492/images/2.png" style="width:250px;height:250px;" />


Same with the text feedback. When I try to insert the code of the picture it´s not working.

[
Code:
<p><font color="#008000">{if(Q00003.NAOK=="A1","You answered correctly.","")} </font> <font color="#FF0000"> {if(Q00003.NAOK=="A1","","Incorrect. 'You chose this graph: <img alt="" src="/upload/surveys/575492/images/2.png" style="width:250px;height:250px;" />")}</font></p>

Do you know how to chance the code so that the picture is popping up?


Thanks a lot :)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #180886 by tpartner
Replied by tpartner on topic Feedback for assessment question

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
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 8 months ago #180935 by mariaa
Replied by mariaa on topic Feedback for assessment question
Thanks a lot for your support! =)
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose