Can someone please explain how to create a slide with a “Checkboxes” question with multiple correct answers and a submit button, that it immediately tells them whether or not it was correct? Thanks!
Make a variable to check for correct answers and that incorrect are unselected.
In the checkbox CL:
check= this.isSelected(1) and this.isSelected(3) and this.isSelected(5)
and not( this.isSelected(2) or this.isSelected(4) )
You can then use checkboxName.script.check
as a condition for note content:
content: when checkboxName.script.check "Correct"
otherwise "Incorrect"
Many people want to wait for submission:
content: when checkboxName.submitted
#or button.pressCount>0 if there's no submit
(when checkboxName.script.check "Correct"
otherwise "Incorrect")
otherwise "Instructions"
Thanks for such prompt response!! This was my first time posting a question and I expected a much longer wait time. Again, on behalf of my students, gracias!
Need help. I was trying to follow these directions but I am still having problems. Thank you ahead of time.
actually I think I found a different cl and it seemed to work for slide 10. I did what was suggested above but couldn’t get it to work. These are two very different scripts but got to the same result. Is there something I am missing? Is one better than the other?
I looked at slide 10. Your variable check1
currently will yield true for any combination of checks that include C and E. If you want to mark incorrect for checks that don’t belong, you need to add “and not(A or B or D or F or G or H or I)
”. Maybe that’s why it wasn’t working. To access this correctness in your note, for you, you would use Check1.script.check1
.
This is the message that I got when I copied and pasted what you suggested. Was the check1.scrip.check1 supposed to go in my note cl or in the checkbox cl?
Pamela Knapp
content: when checkboxName.script.check "Correct"
otherwise "Incorrect"
I you were using the above code in a note, replace checkboxName.script.check
with your Check1.script.check1
This cl is in the unlabeled note. I’m sorry for making this difficult.
Right now in the unlabeled checkboxes named check1 is not showing any errors.
The top line shouldn’t be there. “checkboxName” should be whatever you named your checkbox (which I thought was “Check1”). “check” should be the name of whatever your correction variable is in your checkbox (which I thought was “check1”).
Yay! It’s working now! If I can email your boss I will. Thank you for your patience. Thank you for sticking with me. I truly appreciate it.
Pamela Knapp
My boss is a principal. Just helping to help.
I am new to the content layer programming and have been working with the checkbox code and was wondering a few things.
-
why are two separate windows needed for the code? I’ve included them both here but can I put them together in the same window?
-
Can you direct me to resources to learn the coding?
Thank you
- Do I need that line of code that starts with warning?
Hey lpotter,
Welcome!
- Daniel was suggesting doing the check for correctness directly in the multiple choice element, I’m sure to keep it organized, since it’s that element’s correctness we care about. The other one,
content: when Check1.script.check1 "Correct"
otherwise "Incorrect"
is in a note element, to display feedback to a student. You could put everything in the note element, but it might not be the best idea for organization.
-
Computation Layer documentation and hanging around this forum have been really instructive for me. You’ll often want to take someone else’s work and look at their coding!
-
The
warning
tag isn’t necessary, it’s just nice feedback for teachers to see in the dashboard.
Thank you! Many times I am not sure about the coding…but through trial and error, I can get what I want. Thanks for the resources.
Also
-
You can’t put a
correct:
sink in a note. So, if you want the dashboard checkmark, yes, you need both. You can only set acontent:
sink in the note component, and you can only set thecorrect:
sink in the checkbox component (or input or other component where student work is expected). -
@JayChow from Desmos has webinars posted in this forum. I’d search YouTube as well for tutorials. There’s also a Desmos Educators Facebook group.