Feedback for students

Sorry, I was missing some } in there, and you need a backslash before round. There’s also a different type of " after t in your first line on Slide 8. I edited my comment above. Maybe try copy/pasting again, but check the quotation marks if you have an error about expecting a ) or , .

Oh what a huge difference one little quotation mark makes.

I am also having trouble getting it to assign a 1 if they get the answer correct and a 0 if they are wrong on my last slide which is a lesson score slide.

I have tried a couple different codes but this is my most recent failed code: cellContent(5,2): “${
when ant1.submitted and correct “1”
otherwise “0”}”

with the error “unable to find variable or component correct”

Since correct is not from the current slide, you have to refer to the component…
ant1.script.correct

That was one of my many fails I had tried. The error I get is "unable to find variable correct in component ant1.

OH! Sorry, it’s because correct is in your note. So, name your note and then:
noteName.script.correct

Hi! I don’t know if this is impossible or if I just don’t know what to put in the CL. I know if I want to check a numeric value, I use this.numericvalue in the CL of the math input. I want to check that they enter the correct word on a text input. I tried using “script” but I don’t think I am doing it correctly. Students are naming a cross section. I want the correct input to be “trapezoid.” Can it be done?

this.content will grab text input. You should check the documentation when you’re not sure. In any component, top center will take you to the section for that component. If it’s not there, scroll down and check Functions or Types. You can also Ctrl+F to search.

I tried looking there, but didn’t see what I was looking for in the text input portion.

Ok, now I don’t know what I did wrong. I looked at the CL doc but don’t see this option under Functions or Types. I am trying to apply this on slide 17.

A few things. When checking for text, you have to use quotes, so correct=this.content="hexagon". Also, there is no correct sink for text inputs, so at best you can get a dot in the dashboard. Alternatively, use a table.

gotcha… so I was right in thinking that it wouldn’t be able to check the answer.

I thought you could only use numbers in tables…?

You can check if an answer is correct in a text input (not using the correct sink), and use that to give feedback. It just won’t give a checkmark in your dashboard.

In the menu for a column, you can change between text input and math input.

I think I have confused myself at this point. I’m not sure how to do it with the text input.

I figured out how to use a table though. I am more concerned about the students seeing the feedback than I am about the dashboard.

For example, in a note CL:

feedback=when input.submitted
          (when input.content="hexagon" "Correct!"
            otherwise "Try again.")
         otherwise ""
content: "Your instructions here.

${feedback}"

If an answer has been submitted, the logic in the parentheses is followed otherwise “”.

oo that makes sense! Thank you for all of your help!

i would strongly caution against this type of error correcting code.

string matching is notoriously finicky and really gets into the realm of Regular Expression checking… which I’d love to have but doesn’t currently exist in Desmos.

1 Like

Make it were we can take pictures instead of typing all the work.