+1 vote

I want to create a quiz for my students where their correct and wrong answers for a checkbox question are commented afterwards as in:
you said: a
That is correct because....
you said: b
B is incorrect because....

I know I can provide comments to specific answers using this:
-- if: "Cat" in pets
question: Are you a crazy cat person or just a normal cat person?
--Very crazy

However, the answers to questions I want to use are longer texts and referencing an item in a collection, where the specified item is

*if: "Inertia is a force which keeps stationary objects at rest and moving objects in motion at constant velocity." in question1_answers

is really cumbersome. Especially if I change the wording of one of the possible answers. I'd have to change the wording in the question itself as well as in the *if: ".." in question1_answers bit.

Any better way to do this?

by (270 points)
edited by

2 Answers

0 votes

Hello! I think this is a great question. Maybe you could try creating variables to use as the answer options? That way, you can create shorthand names for them, and you also only have to edit them once (if you later decide you want to tweak one of the answers). Here's an example of what I mean - https://www.guidedtrack.com/programs/15394 (but please take it with a grain of salt, because I haven't got much experience using GuidedTrack yet! I'm just another user). Please let me know if you have any problems viewing that program, or if it didn't achieve what you were setting out to achieve!

by (260 points)
Thank you so much. That is indeed very helpful. What I didn't get was that you can insert a string collection into a question with curly brackets.

I already figured out how to search the saved answers collection with *find, but in order for that to work for different questions, I had to include numbers like 1., 2., 3. into the answer options themselvers, which is a bit awkward and unnecessary. Your suggestion therefore is much better!

Thank you anon!
Thank you!! I'm very glad to hear that was helpful! :)
0 votes

Anon gave a sleek answer, which I liked.
I just wanted to comment on an alternative, which is to assign a variable after each alternative. For instance:

*question: What is your favourite colour?
	Yellow, like a shining sun.
	Blue, as the bluest skies!

*if: not answer = "correct"
	You're wrong! Yellow is the colour!

---Or, if you'd like to add an explanation for each answer.

*question: What is your favourite colour?
	Yellow, like a shining sun.
	Blue, as the bluest skies!
	Green, green, green, green...
	I want it all painted black.

*if: answer="yellow"
	You're right! Yellow rocks!
*if: answer="black"
	No! Black is not a colour. It's the absence of colours.
--- and so on...

Please, notice this wouldn't work with a question of the Checklist type. Anon's answer is more suitable for that.
Hope that helps!

by (440 points)

Hi! This code allows you do something similar with checkboxes:

>>answerList = [["The Earth is round", "round"], ["The Earth is a star", "star"], ["The Earth is a planet", "planet"]]
*question: Select all that are true:
	*answers: answerList
	*type: checkbox
	*save: theirAnswers

If you run the code above and select the first and third answer, the variable theirAnswers will be the collection ["round", "planet"].

Welcome to Guidedtrack Q&A, where you can ask questions and receive answers from other members of the community.
134 questions
144 answers
40 users