|
Post by verena on Jul 21, 2020 10:44:50 GMT
Dear all,
I would like to make a small quiz, that has four questions, with multiple choice answers. After playing a sound, a participant should answer a question. while there are three possible answers (radio), only one answer is correct. So, it would be nice to code a correct answer with 1 and incorrect answer with zero. Only, when the correct score is 4 the experiment should start. Is something similar possible?
l: q1 a: audio1.mp3 t: info q: Play the sound. Why was played in the audio? - a voice - a horse - a train
l: q2 a: audio2.mp3 t: info q: Play the sound. Why was played in the audio? - a duck - a car - a crying child
l: q3 a: audio3.mp3 t: info q: Play the sound. Why was played in the audio? - a trumpet - a clown - a thunderstorm
l: q4 a: audio4.mp3 t: info q: Play the sound. Why was played in the audio? - a cat - a bus - a ball
I want that, if and only if ALL FOUR answers are correct, the survey will continue with an experiment.. if correct is coded with 1 and inccorect with zero, it would be something:
l: score t: set - sum $q1 $q2 $q3 $q4
l: t: jump - if $score = 4 then goto experiment
But. how can I set a score to 1 and all other to zero? And I need much longer answers than just a word, so a scale is not the right choice here. thank you very much for your help.
|
|
|
Post by verena on Jul 21, 2020 11:20:33 GMT
I tried the following:
l: q1 a: Sprachtest1_Radio.mp3 t: radio q: Spielen Sie den Sound. Was hat Kathrin gewonnen? - Ein Elefentenbaby - Einen Ausflug - Eine Rundreise durch Thüringen
l: qCorrect1 t: set - if $q1 == 2 then 1 - if $q1 != 2 then 0
l: q2 a: Sprachtest2_Autobahn.mp3 t: radio q: Spielen Sie den Sound. Wo sollten Autofahrer nicht langfahren? - Landstraße von Weimar nach Jena - Autobahn von Weimar nach Jena - Jena Stadteinwärts
l: qCorrect2 t: set - if $q2 == 1 then 1 - if $q2 != 1 then 0
l: q3 a: Sprachtest3_Bahnansage1.mp3 t: radio q: Spielen Sie den Sound. Was darf man nicht mitnehmen? - Gepäck - Fahrräder - Hunde
l: qCorrect3 t: set - if $q3 == 3 then 1 - if $q3 != 3 then 0
l: q4 a: Sprachtest4_Bahnansage2.mp3 t: radio q: Spielen Sie den Sound. Welche Verbindung gibt es nicht? - Von Gera nach Altenburg - Von Altenburg nach Leipzig - Von Gera nach Bad Köstritz
l: qCorrect4 t: set - if $q4 == 2 then 1 - if $q4 != 2 then 0
l: correctScore t: set - sum $qCorrect*
l: feedback t: info q: Die Anzahl deiner Korrekten Items {$correctScore}
but it is not working.. the $correctScore is always 0, as the items qCorrect1, qCorrect2, qCorrect3, qCorrect4.. what is wrong?
|
|
|
Post by verena on Jul 21, 2020 12:11:02 GMT
|
|
|
Post by alexandra (AEC) on Jul 21, 2020 14:58:25 GMT
Hi there, your first attempt looks already very promissing. In your second example you correctly changed the type of the question to radio. As radio questions are saved in accordance with the order of the answers, which you seem to know acccording to your second example, I gather the correct answers are the 2nd (q1), 1st (q2), 3rd (q3), and 2nd (q4) answer option respectively. Following, the correct sum would be 2 + 1 + 3 + 2 = 8:
l: q1 a: Sprachtest1_Radio.mp3 t: radio q: Spielen Sie den Sound. Was hat Kathrin gewonnen? - Ein Elefentenbaby - Einen Ausflug - Eine Rundreise durch Thüringen
l: q2 a: Sprachtest2_Autobahn.mp3 t: radio q: Spielen Sie den Sound. Wo sollten Autofahrer nicht langfahren? - Landstraße von Weimar nach Jena - Autobahn von Weimar nach Jena - Jena Stadteinwärts
l: q3 a: Sprachtest3_Bahnansage1.mp3 t: radio q: Spielen Sie den Sound. Was darf man nicht mitnehmen? - Gepäck - Fahrräder - Hunde
l: q4 a: Sprachtest4_Bahnansage2.mp3 t: radio q: Spielen Sie den Sound. Welche Verbindung gibt es nicht? - Von Gera nach Altenburg - Von Altenburg nach Leipzig - Von Gera nach Bad Köstritz
l: correctScore t: set - sum $q*
l: ToExperiment t: jump - if $correctScore == 8 then goto experiment # I just added another '=' but theoretically you would not need that
l: experiment t: experiment - myexperiment
What do you want for participants to happen, in the case of an incorrect answer score?
|
|
|
Post by verena on Jul 21, 2020 18:12:04 GMT
Thank you Alexandra for your response. I thought the same, but this does not solve my problem. In case that a person always answers response "2" the four questions also sum up to 8, but then the experiment would not start. do you know of a solution?
|
|
|
Post by PsyToolkit on Jul 22, 2020 8:57:43 GMT
Alexandra's advice is good, especially use the * in the sum makes coding easy.
There is a simple solution for this if you want only a one for correct and a 0 for incorrect answers. You can do it as follows:
l: math t: radio q: How much is 2 + 2 ? - {score=0} 2 - {score=0} 3 - {score=1} 4 - {score=0} 5
l: feedback t: info q: Your score is {$math}
You do not need the feedback question, but it just quickly shows you the idea. You only get one for the correct answer. Also, I noticed you used t: info in your survey, but it should be t: radio The latter is when you want that people pick one choice out of many. The info only gives feedback, it does not allow people to choose anything.
Thus, the {score=1} just sets the score for that item in case it is chosen.
|
|
|
Post by verena on Jul 24, 2020 4:54:46 GMT
Thank you a lot! Your final post eventually solved my problem! kind regards Verena
|
|