Card Sort Answer Key

I am very new to using CL. I have created a card sort and want to give students the opportunity to receive instant feedback. Is there a document with specific steps on how to do this?
I read through Computation Layer Documentation but there is not a sample code for Card Sort answers.

Can’t really give feedback on specific answers. The sources available are totalCorrectCards (returns a number), totalCards (returns a number), and matchesKey (returns true or false). Any feedback you want to give will have to be related to those things.

Here’s a collection put together by Jay Chow and John Rowe that has a whole bunch of card sort examples with feedback. You can’t get too specific with the feedback (i.e. this specific group is correct but that one isn’t), but this should help.

1 Like

Can anyone explain what is happening within the code of “Card sort with 3 hints along the way” I attached a picture point to where in the code I am needing clarification. Thanks everyone.

Please see the attached image

When you define a simple function that has more than one variable (or a single variable other than x), you need to specify what those variables are. (so “a” and “b” in exp1)

When you evaluateAt, you need as many parameters as there are defined variables. So, exp1 is a function, “a-b”, which is being evaluated at “total” and “correct”, so yes to your first question. It probably could’ve been done more simply. I would’ve used:

exp1 = numericValue("${total}-${correct}")
exp2 = numericValue("${total}/${correct}")

“What is 1, 2, and 3?” Those are the values being evaluated. “PartOne” is essentially defining a function, like f(x)=x/4 and then evaluating it at 1, like f(1). This code seems useless to me in this example because “PartOne” will always equal 0.25, so just use:

PartOne = 0.25
PartTwo = 0.5

I too am VERY new to CL and would love a step by step to add to a card sort so students can see how many cards they have sorted correctly.
I want to learn but some of the computing language is confusing to me - thank you in advance!!!

There are tutorial videos here.

Hello! I’ve created a card sort and have instituted CL for students to check. However, I have yet to see an example of CL that allows for partial correctness. That is, my card sort consists of five categories and 20 items that need to be sorted into those five categories, thus each category has four items nested under each respective category. However, let’s say that a student correctly places three items under each category (meaning they’ve gotten 15 correct out of the 20 possible) but they’ve mixed up each of the remaining five items. CL returns it as 0 correct; they essentially have to get all or nothing. Is there any CL that would return the amount they got correct in this way?

1 Like

I use the following:

  1. Create your card sort
  2. Title the sort…”sort1”
  3. Make the key
  4. Copy-paste the script into the computational layer next to the Teacher Tips button

NOTE: The text between the green check marks is the text that will appear at the top of the screen. The title of the sort must match “when sort___.matchesKey”. The number of green check marks does not correlate with the number of cards.


when sort1.matchesKey

:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:Type your directions here​:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:


“Copy and paste your directions here”

How many cards are correct? To show students how many cards are matched correctly copy/paste the script below into the same CL as the correct key.

This code imports the total number of correct cards in

a card sort called “sort” and assigns it to a

variable called “correct”.

correct = sort.totalCorrectCards

This code injects that variable into the subtitle.

subtitle: “Total Correct Cards: ${correct}”

I hope this helps…a year later.

1 Like