Forum Discussion
Fill in the blanks using numbers
Let me share two secrets for the kind of project your are developing.
1. You can put numbers into text variables. You only need numeric variables if you are going to do calculations with them. It's true that numeric variables won't let you enter text, but what's the difference if you enter "cow" or "4" when the correct answer is "5"? The patient still dies.
2. Always copy what works. Slide 1 works; copy it, then change the variable names and the answers. Here's what it looks like: (fortunately all your variables are grouped with ones performing like actions all together. I can refer to the first one, and what I say applies to all the ones like it that follow.)
In slide 1:
Text Entry FIB_A places the entered value into variable FIB_A (using the same name confuses me, and makes it harder to troubleshoot. I would suggest FIB_A_TE [Text Entry] and/or FIB_A_Variable).
Then FIB_A_correct (good variable name) is set to TRUE if the entry is the right answer. ( You could just use FIB_A_Variable, but doing it the way you did makes it much easier to accept alternate spellings.) Since FIB_A_correct defaults to FALSE, it works to change it TRUE only if it is correct.
Then Correct is selected if all the ..._correct variables are TRUE, or Incorrect is selected if even one of them is FALSE. All good, well designed, and it works.
In slide 2
Text Entry FIB_num_Fent1 places the entered value into variable NumericEntry1. (You can edit those names in the variable pane. Changing it there will change it everywhere.)
Then the problems start. FIB_numb_Fent1_correct should be set to TRUE if NumericEntry1 is the correct value. Instead, NumericEntry1 is disregarded, and never used again. Rather, Num_Entry_Fent1 is set to the desired answer, which is an unnecessary step. In this case, it doesn't hurt anything, because those variables are also never used.
Then Correct is selected if all FIB_numb_..._correct have the correct answers. They can't, because no triggers ever set them, so they are all wrong.
Then Incorrect is selected if all of ..._correct are FALSE. Actually, you want the question to be wrong if even one answer is incorrect. Slide 1 does that by connecting the conditions that select Incorrect with "or". Slide 2 doesn't because it uses "and".
I recommend that Text Entry FIB_num_Fent1 places the entered value into variable FIB_num_Fent1_variable. Then FIB_num_Fent1_correct is set to TRUE if FIB_num_Fent1_variable is the right answer. Then Correct is selected if all the ..._correct variables are TRUE, or Incorrect is selected if even one of them is FALSE.