Multiple choice submitted without explanation

I’d like to show feedback on their MC question before they’ve clicked submit in the “Explain your Answer” prompt. This behavior seems to be different from a Math Input, which will be “submitted = true” even if they haven’t explained their answer yet. I’ve attached a video to show what I’m talking about. Is there a boolean value I can use or make to do this?

https://www.youtube.com/watch?v=FFoqQNnXBm0

You should be able to use isSelected() .

nothingText= when MCname.isSelected(1) “this is 1 text”
when MCname.isSelected(2) “this is 2 text”
when MCname.isSelected(3) “this is 3 text”
otherwise “Nothing.”

That works, but it’s very long. I have 5 solutions, and I’ve already done all the if statements for the one that is correct (the correct answer is based on which question was chosen to display):

correct = when q.quadrants1and2 this.isSelected(1) otherwise
when q.quadrants2and3 this.isSelected(2) otherwise
when q.quadrants3and4 this.isSelected(3) otherwise
when q.quadrants1and4 this.isSelected(4) otherwise
this.isSelected(5)

correct: correct

Now, I want to give feedback in the Note like this:

content = "A blank unit circle is shown with the quadrants listed.

In which quadrants is `${inequalityWithTheta}`, where `${theta}` is in radians?

${feedback}
"

feedback = when trigValueInput.submitted
  when trigValueInput.script.correct "✅ Correct!"
    otherwise "❌ Incorrect."
  otherwise ""

But trigValueInput.submitted isn’t triggered. Would I have to do the if statements all over again? Like this?

when q.quadrants1and2 and this.isSelected(1) "✅ Correct!" otherwise
when q.quadrants2and3 and this.isSelected(2) "✅ Correct!" otherwise
... (go through the four other correct options) ...
when q.quadrants1and2 and not this.isSelected(1) "❌ Incorrect" otherwise
when q.quadrants2and3 and not this.isSelected(2) "❌ Incorrect" otherwise
... (go through the four other incorrect options) ...
otherwise ""

I’m hoping there’s a better way!

It’ll be much easier to assist if you post a link to your activity. Then people can just look at your code. I think I’m confused about your expectations. My response was to create different feedback depending on the choice selected. I named it nothingText because in the video you highlighted “Nothing”. Regardless of the submit button being clicked that text will change depending on which choice is selected. There’s a much shorter way if you just want Correct or Incorrect, but students will just click unthoughtfully until they get the correct answer.

It looks like your new code has some confusion:

  1. You only need one ‘otherwise’ unless you’re nesting a conditional inside a conditional, so in general:

when yourCondition result
when yourCondition result

otherwise defaultResult

  1. The ‘correct’ sink needs to be a condition that can be true or false. Currently, ‘correct’ (the variable) outputs a number, which you try to use for the correct sink. Desmos will be confused.

  2. In your feedback variable, ‘trigValueInput.script.correct’ will not access the ‘sink’ (which it looks like you intend), it access the ‘correct’ variable (which again is a number not a true-false).

I’m sure there’s an elegant solution to your issue, but again it would be much easier to just see your code.

Ah, I think I’m looking for the much shorter way: just correct or incorrect. For this particular one, I do want them to be able to see if they’re right so they still can get the next one right.

  1. The conditional seems to be working?
  2. The “correct” is giving me the right response. Maybe it’s in spite of the CL?
  3. Yeah, I want it to access the variable, not the sink.

I understand it’s confusing. Here’s the activity. AFM Review April 27-May 1 • Activity Builder by Desmos The questions are on Slides 5 and 6. Thank you!

Okay, now looking at it, it makes more sense.

  1. I didn’t think it wouldn’t work. The extra otherwises were just unnecessary. :grin:
  2. It was late and I see how I misconstrued what was happening. It’s fine. Again the otherwises don’t break it, they’re just unnecessary.
  3. It’s actually a simple fix. Your component isn’t named trigValueInput. It’s quadrantMC.

Now, for the feedback to show in your note right away, but nothing if they haven’t selected takes a little more, but I’d actually avoid that. When I tried it, the frame moves focus down where you can’t actually see it. If you didn’t know it changed, why would you scroll up. Alternatively, I would put feedback in the explainPrompt using:

`feedback = when quadrantMC.script.correct “:white_check_mark: Correct!”

otherwise “:x: Incorrect.”`

Oh, I also noticed in slide 3 you weren’t sure if Desmos could do better than just recognize an equivalent expression. You can use countNumberUsage in addition to your evaluateAt. Since you’re simplifying (bx^a)^e, you’re looking for b^e x^(ae), so within your check:

...and countNumberUsage(input.latex,numericValue("${b}^${e}"))=1 and countNumberUsage(input.latex,numericValue("${a}*${e}"))=1

Oh, that’s brilliant for the exponent count! For the others:

  1. How do I do it without the extra otherwises?
  2. Same question as #1
  3. Yeah, that was just there to have the code handy. I like the idea to just put it in the explainPrompt: that is a de-facto “isSubmitted” check. I’ll do that: thanks!

I still have two questions:

  1. What’s the shortest way for a student to see if they’re correct or incorrect on a MC question, if the correct answer might change based on previous slides? Is it to put the feedback in the explainPrompt, or is there another way (esp. if I don’t need them to explain?)
  2. Is there a reason that MC.submitted doesn’t work for MC questions? Am I doing something wrong, or is it not supported?

1&2. Just delete the otherwise at the end of each when line. It’s only the final otherwise that is needed.

  1. It was just your changing correct answer that makes it difficult. It’s still possible to put it in a note. Instead of the default being the last line (the otherwise “”), you could have an initial condition

when not(isSelected(1) or isSelected(2) or isSelected(3) or isSelected(4)) ""
then continue with your when correct, and the otherwise will end up being the incorrect. Basically, if nothing is selected feedback is blank.

  1. MC.submitted works, but the submit button only appears for the “Explain” portion.

WOW, not having the other otherwises is fantastic. And nested when/otherwise statements still work <3.

Thanks for your help!