Checkboxes with Student feedback

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!

1 Like

Need help. I was trying to follow these directions but I am still having problems. Thank you ahead of time.

1 Like

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.

1 Like

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?

Screen Shot 2021-01-29 at 10.50.34 AM.png

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

Screen Shot 2021-01-29 at 10.50.34 AM.png
Screen Shot 2021-01-30 at 10.41.54 AM.png

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. :smile: 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.

  1. 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?
    Screen Shot 2021-05-04 at 6.37.40 AM

  2. Can you direct me to resources to learn the coding?

Thank you

  1. Do I need that line of code that starts with warning?

Hey lpotter,


  1. 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.

  1. 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!

  2. 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.


  1. 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 a content: sink in the note component, and you can only set the correct: sink in the checkbox component (or input or other component where student work is expected).

  2. @Jay from Desmos has webinars posted in this forum. I’d search YouTube as well for tutorials. There’s also a Desmos Educators Facebook group.

1 Like