# Correct if MC isSelected AND numericValue is #

**URL:** <https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654>\
**Category:** Questions\
**Tags:** dashboard, validation, correctness\
**Created:** [January 8, 2023, 6:37pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654 "2023-01-08T18:37:47Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [January 8, 2023, 6:37pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/1 "2023-01-08T18:37:47Z")

</div>

Would like to have checkmark appear in Dashboard for when the student selects a certain level of question (from a multiple choice) AND inputs correct answer.

Using:  
correct: (pick.isSelected(1) and this.numericValue=22) or (pick.isSelected(2) and this.numericValue=10) or (pick.isSelected(3) and this.numericValue=4)

is working to show correct but not only a dot in the dashboard.

Here is activity:

> **[Correct if MC AND numericValue • Activity by Chris Lee](https://classroom.amplify.com/activity/63bb0c38b1a5a88a2fe13baf)**
>
> by Chris Lee

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [January 8, 2023, 8:55pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/2 "2023-01-08T20:55:02Z")

</div>

The dot is appearing because of the free-response component where students are asked to add their work. There is no way to mark a free-response component as `readOnly`, so one option would be for students to add their work on a separate screen. As is, a teacher can still quickly scan through student screens to check correctness with the checkmarks. Hope that helps!

---

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [January 8, 2023, 9:34pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/3 "2023-01-08T21:34:39Z")

</div>

Okay. Thanks. I deleted the Free Response and it worked. I was thinking it could be ignored like text but I understand now how that wouldn’t work. Maybe in the future that will be changed to allow for quick reference on Teacher Dashboard without inputting image on another screen.

Thanks!

---

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [January 9, 2023, 1:24am UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/4 "2023-01-09T01:24:21Z")

</div>

@ianmcmeek Follow up question:

[On slide 4](https://teacher.desmos.com/activitybuilder/custom/63bb0c38b1a5a88a2fe13baf)…  
I want dashboard to show checkmark if student selects:  
Level 2 AND x = 65  
OR  
Level 3 AND a = 45

Unlike my first question there is not Free Response BUT the students answers in a different Math Response box based on which Level question they select.

---

<div class="post-metadata">

**Author:** ![Bryn](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/bryn/32/40_2.png) [@Bryn](https://cl.desmos.com/u/Bryn)\
**Post date:** [January 9, 2023, 5:49am UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/5 "2023-01-09T05:49:23Z")

</div>

One alternative that is sometimes suitable is to use a sketch component for students to enter their rough working; it is possible to make sketch components have `readOnly: true `

---

<div class="post-metadata">

**Author:** ![ianmcmeek](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/ianmcmeek/32/3966_2.png) [@ianmcmeek](https://cl.desmos.com/u/ianmcmeek)\
**Post date:** [January 9, 2023, 1:56pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/6 "2023-01-09T13:56:43Z")

</div>

Try commenting out the correctness check on one of the math response boxes and adding `readOnly: true`. I’m not sure why that works, but it seems to 🙃  
Why did you choose to have two separate math response boxes? Depending on your reasoning, you could merge them to simplify checking correctness.

@Bryn - good call with the sketch component. I like that option!

---

<div class="post-metadata">

**Author:** ![Pamela\_Davis](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/pamela_davis/32/1890_2.png) [@Pamela\_Davis](https://cl.desmos.com/u/Pamela_Davis)\
**Post date:** [January 10, 2023, 3:06pm UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/7 "2023-01-10T15:06:02Z")

</div>

My work around for this problem is I add a note component asking for student to explain… and then I add a table. On the table, I remove remove all headers and I remove one column so that there is only one cell available to the student. I make sure to change the cell to “Format as text”. Then the coding I put in the table is:  
correct: not(isBlank(this.cellContent(1,1)))

By doing this coding, I will get a checkmark as long as the student typed “something” in the cell. I can then go back to review what students wrote but know that they have everything correct or not.

I’ve made a few adjustments to your activity. If you would like to use it, feel free:

> **[\[Copy of\] Correct if MC AND numericValue • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63bd7f7a512738c1a5acb4c2)**
>
> by Pamela Davis

---

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [June 3, 2023, 12:31am UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/8 "2023-06-03T00:31:35Z")

</div>

Thank you @Pamela_Davis ! I liked your work around of using the table and your thinking about the explain problem.

The CL code that I really loved was  
readOnly: not(pick.isSelected(1))

This was the key to allow students to pick a level, answer those questions AND show me correctness on the dashboard, when the other choices were left blank. Exactly what I needed! Updated the original slides to show the final version with your code.

> **[Correct if MC AND numericValue • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/63bb0c38b1a5a88a2fe13baf)**
>
> by Chris Lee

Thank yoU!

---

<div class="post-metadata">

**Author:** ![chrisleechss](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/chrisleechss/32/1624_2.png) [@chrisleechss](https://cl.desmos.com/u/chrisleechss)\
**Post date:** [June 3, 2023, 12:37am UTC](https://cl.desmos.com/t/correct-if-mc-isselected-and-numericvalue-is/4654/9 "2023-06-03T00:37:03Z")

</div>

Thanks @ianmcmeek .

I included two separate math response boxes because I wanted to student to select the level of difficulty they were going to attempt, which meant the correct answers would be different depending on the question they picked. My thinking was that I need two responses and then check correctness on them individually.

I was worried about only having one and saying something like:  
correct: this.numericValue=65 or correct: this.numericValue=45  
because I wouldn’t want them to pick the first one incorrectly type 45 and still get it right.

@Pamela_Davis showed me the readOnly: not(pick.isSelected(1)) code that was key to solving my problem.

Thanks again!
