HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... variable answers to questions
variable answers to questions
  View type:
I have made a slide with some variables (#one, #two, #three, #four and #five).

I want to have a numeric fill-in blank question where the answer is one of these variables.

I have tried putting the condition for correct answer as equal to #three but when I submit the answer, it accepts any number as being correct.

Is it possible to do what I want?
 
Hi Graeme,
you should be able to do this, the main problem will be the comparison of the variables. YES Yes yes are the same word but depending on how you compare them will give different results.
Your code for handling this should be looking something like this:
IF(Condition='#select_yourvar'=='the answer')
[indent]ACTION to do if right
[indent]ELSE
[indent][indent]Action to do if wrong
 
 
Thanks - I did this but it didn't work - is it anything to do with the fact that I am using a numerical fill in question - so my variable is a number and not text?
 
 
 
Could well be, have you wrapped the value you are comparing the response against in quotes?
 
 
 
 
No
I've managed to get round the problem by designing a custom question made up of a text fill in form and button to submit answer. I've added some script to compare and it works OK - thanks.
Subject:
Message options
No additional options