# Multiple choice question score based on number of checked answers

3 years 7 months ago #118077 by mettjus
mettjus created the topic: Multiple choice question score based on number of checked answers
Hi!

Say I have a multiple choice question with 10 possible answers.
I'd like to make the question add 1 point to current score only if at least 3 answers are checked, 0 points otherwise.

How can I do that? Can it be done in assessment mode?

I have prepared 3 assessments based on score and can't figure out how to make that question score 1 point or 0 (I understood ho to make each answer add 1 point).

Thx

3 years 7 months ago #118078 by Ben_V
Ben_V replied the topic: Multiple choice question score based on number of checked answers
Hi,
The use of the assessment module is not necessary required You can use the following expression in an equation type question to retrieve the score for this question ( "Q1" code)
{if(count(that.Q1)>="3",1,0)}

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)

3 years 7 months ago #118083 by mettjus
mettjus replied the topic: Multiple choice question score based on number of checked answers
Thx!

But say I have my survey already set up with assessment Mode on, is there a way to use such expression for calculating the score before it gets evaluated for assessment?

In case of not using assessment Mode how can I get the same behaviour (assessments are shown after submitting the survey)? Where should I put the question with the expression?

3 years 7 months ago - 3 years 7 months ago #118085 by Ben_V
Ben_V replied the topic: Multiple choice question score based on number of checked answers
Ok,
What you can do is using a final equation question to retrieve the overall score based on the computed Q1 score + score for all others questions ( => {assessment_CURRENT_TOTAL} )

The equation will be something like:
{sum(assessment_CURRENT_TOTAL, if(count(that.Q1)>="3",1,0))}

/!\ in the advanced settings of your mutliple choice question (Q1), check that the assess value is set to 0, to avoid extra added points

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: 3 years 7 months ago by Ben_V. Reason: /!\ {ASSESSMENT_CURRENT_TOTAL} & ASSESSMENT_CURRENT_TOTAL