A simple table check - What purpose is the portion from correct on?

I copied this code to check if table contents was correct, and I was wondering what the purpose of the code from the word “correct” and below is ? It seems to work fine with out it.

cellContent(1,3): when tbl9.cellNumericValue(1,2)=0 “:white_check_mark:” otherwise “:x:
cellContent(2,3): when tbl9.cellNumericValue(2,2)=-8 “:white_check_mark:” otherwise “:x:
cellContent(3,3): when tbl9.cellNumericValue(3,2)=12 “:white_check_mark:” otherwise “:x:
cellContent(4,3): when tbl9.cellNumericValue(4,2)=-20 “:white_check_mark:” otherwise “:x:
cellContent(5,3): when tbl9.cellNumericValue(5,2)=-40 “:white_check_mark:” otherwise “:x:

correct:
tbl9.cellNumericValue(1,2)=-3 AND
tbl9.cellNumericValue(2,2)=13 AND
tbl9.cellNumericValue(3,2)=-3 AND
tbl9.cellNumericValue(4,2)=13 AND
tbl9.cellNumericValue(5,2)=27

You’d need to change the values, I think, but the correct: sink controls the teacher dashboard. If all correctable components are true for their correct sinks (or marked as readOnly: true), then the teacher dashboard will show a checkmark.

If there are any ungradeable components (i.e. explain prompts or text inputs) which require a teacher to look at them, you’ll never get a checkmark, at best a dot.

Awesome…learned something new…I am just playing around with this for the first time. I was wondering if there was a way to control the teacher dashboard. Now I know!

content: “{message} {feedback}”

message = “For the function shown on the left, what is the output when the input is 5?”
feedback = when mthInput1.submitted and mthInput1.numericValue=9 “\n\n\n✅Good work ! !”
when mthInput1.submitted “\n\n\n\n❌Wrong answer. Please try again.\n\n Remember PUT 5 in for x!”
otherwise “”

So the correct answer in text box “mthInput1” here will “9” …If I understand correctly, there is no way i can get a check mark on my dashboard if a student enters a 9 ?

disableEvaluation: true
correct: exp1.numericValue=11.75

Will this do it? Again, this is my first shot at this…I appreciate the help. Not sure of the disableEvaluation means

Always easier for people helping you to publish and share your activity. You look like your mixing things a little (mthInput1 vs. exp1).

disableEvaluation: true means if a student types in a numeric expression, the input won’t evaluate the expression. Default it’s false, so if a student types “3*5+16”, to the right in the input it will show “=31”.

For your question about the message/feedback part. The teacher dashboard requires you to use the correct sink. So, if you wanted a checkmark when mthInput1 is 9:

correct: mthInput1.numericValue=9

If there are any other components that could be corrected (i.e. sketches, graphs, tables, multiple choice, etc.), they also have to have their correct sink used or readOnly: true, meaning it won’t be checked for correctness. If either is not done, you’ll get a dot instead of a checkmark because something has to be checked by the teacher.

i thought I would use the naming convention mthinput for math input box, but i definitely need to fine tune that as I figure out what is best.
Thank you for you help!.. It worked perfectly

I’m trying to learn all of this and I’ve been copying and pasting with some adjustments from other activities similar to what I am trying to create. In this activity, the student has a table in which they need to write their responses as exponential expressions (2^2, etc.). I thought that I had all the code written correctly but I still can’t get a check mark on the teacher dashboard. I think the line that is affecting this is:

correct: this.cellContent(3,3) = “\\2^2” and this.cellContent(4,3) = “\\2^3” and this.cellContent(5,3) = “\\2^4” and this.cellContent(6,3) = “\\2^5” and this.cellContent(7,3) = “\\2^6

Ideas on what my error is?
Thank you!

You don’t need the double slashes, and it’ll be more accurate if you use backticks to check latex instead of quotes.

Note that this content check is for the 3rd column. The backticks Daniel_Grubbs suggested will check this for the LaTeX expression instead of numerical equivalence, so 2*2 or 4 will not be correct answers for 2^2

correct: this.cellContent(3,3) = `2^2` and this.cellContent(4,3) = `2^3` and this.cellContent(5,3) = `2^4` and this.cellContent(6,3) = `2^5` and this.cellContent(7,3) = `2^6`