Welcome to the LimeSurvey Community Forum

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

Number of Correct Responses Sent in Confirmation Email Template

  • rschipull
  • rschipull's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #124674 by rschipull
I have a pretty straight forward multiple choice question survey set up. I have the assessment function turned on and have the correct answers designed with a 1 and incorrect designated with a 0. What I'd like to be able to do is send the # of correct, total number of questions in the survey, and % correct to each respondent via the confirmation email when they've finished the survey. Is there an easy way to do this?

thanks,

rob
The topic has been locked.
  • gabrieljenik
  • gabrieljenik's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
8 years 7 months ago #124675 by gabrieljenik
It is no piece of cake, but it shouldn't be rocket science.

You may add some Equation Questions in the survey which computes the data to be sent.
Then add the computed answers, from the Equation Question, in the confirmation email.

Some Expression Manager would be needed.

That should make it!

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Checkout our Reporting Solutions and our plugin shop at www.encuesta.biz .

The topic has been locked.
  • rschipull
  • rschipull's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #124681 by rschipull
Is it possible to source the computation of total correct from a saved/stored value from the assessment function? All of my assessment valus are set to 1 for correct and 0 for incorrect.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 7 months ago #124692 by tpartner
No, as Gabriel says, you will need to use Expression Manager to calculate the "total correct" and pipe it into the email.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • rschipull
  • rschipull's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #124716 by rschipull
Thanks for the responses guys.

I found this in the Limesurvey Manuel:
Using Expression Manager for Assessments

Here comes another example on how to use the Expression Manager with Array type questions and assessments: Lets say you have 2 array questions and you want to save the results of the calculation data to your database. It is actually simple, you will need to create and test your arrays and submit a dummy response to see if it works and gives you the results in the completed page.

Implementation details:
•add a question of type equation
•add this equation exactly at is it: ◦assume Q1 is your array question code
◦and Q2 is your second array question code
◦equation: {sum(Q1_SQ001.value,Q2_SQ001.value)}

Note that SQ001 is the default the internal code for array subquestions. If you change the subquestion code, adjust the equation above accordingly.

I created a dummy equation question at the end of my 2 question dummy survey and entered the below in the "Advanced Settings" "Equation" field:

{sum(Q001_SQ001.value,Q002_SQ001.value)}

Questions:
1) If I have just a general multiple choice survey, would I remove the subquery reference?
2) Am I adding this logic in the correct spot?
3) How do I then store the value to include in my confirmation email?

thanks,

rob
The topic has been locked.
  • rschipull
  • rschipull's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 7 months ago #124728 by rschipull
I think I figured it out so thought I'd post in case someone else had this question in the future.

I created a dummy survey that consisted of 2 questions (Q001 and Q002 were the labels in the "Code" text box) with 4 multiple choice answers. I enabled the Assessment feature and assigned a 1 to my correct answer and a 0 to the incorrect answers. Next, I created a 3rd question that I designated as an equation question that I named TotCorrect in the "Code" text box. I then placed the following formula in the "Question:" textbox: {sum(Q001.value,Q002.value)}. The values of the correct answers are then stored in the {TotCorrect} variable. And finally I went to the "Confirmation" email template and added in the following text:

Total number correct: {TotCorrect}

Now after the completion of each survey/test the recipient will get their total number of correct answers included in the auto-generated confirmation email.

Hope this helps

rob
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose