Ordered List Multiple Correct Sorts

I have an ofdered list that has two possible correct sorts, is there a way I can code the key so that it accpets both lists? Is there an example of this already created? I’ve looked but not found one. I’m referring to screen 3 of this activity:

First make sure you check the “Use Order as Answer Key” in the 3 dots menu (which will also shuffle your list). Then, add this in the CL:
correct: this.matchesKey or (this.indexOfItem(1)=2 and this.itemAtIndex(2)=1 and this.itemAtIndex(3)=3)

Awesome! Thank you so much!

Thanks for this! I thought I had my sort figured out, but I’m getting a syntax error in my CL “Top level declarations must be variable or sink arguments.” (What’s weird to me is that I’m using almost identical code on another slide and it’s ok there.) What am I missing?

description = “How should the following statements be ordered to mirror the logic of a hypothesis test?”

right = list.matchesKey

content:
“${description}”
when right “You got it!”
otherwise “Move the tiles by clicking and dragging them to the correct order.”

Your conditional statement at the end is causing the problem. Try assigning a variable to it.

description = “How should the following statements be ordered to mirror the logic of a hypothesis test?”

right = list.matchesKey

feedback = when right “You got it!”
otherwise “Move the tiles by clicking and dragging them to the correct order.”

content:
“${description}

${feedback}”

1 Like

Thanks! Interesting that I was able to do it that way before but can’t now. I’ll change all of my formatting to this as I think it’s cleaner anyway :slight_smile: