In this tutorial you will create a math word problem in the Caveon SmartItem API graphical editor. Here are the steps:

- Step One: Consider the skill you wish to test
- Step Two: Select a template
- Step Three: Write a static shell
- Step Four: Develop data sources
- Step Five: Define dynamic variables
- Step Six: Replace content in your static shell with dynamic variables
- Step Seven: Set your correct and incorrect options

## Step One: Determine the skill you wish to test

For this guide, we’re going to pull a math standard from the third grade common core:

Solve two-step word problems using the four operations. Represent these problems using equations with a letter standing for the unknown quantity. Assess the reasonableness of answers using mental computation and estimation strategies including rounding.

Each verb in this standard is a separate skill. They are related, but the logic required to test them all within one item, no matter how smart it is, will quickly become cumbersome as more variables are introduced. Therefore, I recommend we focus on the first part:

Solve two-step word problems using the four operations.

There are sixteen different combinations of the four operations (addition, subtraction, multiplication, division). Initially, you might be tempted to try to create a SmartItem that randomly selects one of these combinations and alters the syntax of the word problem to fit this selection. While this is certainly possible, it is still a little cumbersome for this exercise. Also, you might find that some combinations should occur more commonly than others. For example, addition-subtraction might be more important to test than division-multiplication.

Because this is your first SmartItem, we’re going to restrict it to addition in the first step and subtraction in the second step. This will allow us to more easily add variables to the content because the syntax won’t need to change as much.

## Step Two: Select a template

In this tutorial we are going to create a basic multiple choice question. Click Select Template and check the box for Multiple Choice.

## Step Three: Write a static shell

A two-step word problem using addition and subtraction looks like this:

Ben and Lucy were picking apples from a tree. Ben picked twelve apples, and Lucy picked nineteen apples. If ten of the apples were rotten, how many good apples did they have?

Let’s store this static content in the stem field. It will give us structure as we attempt to make it as dynamic as possible.

## Step Four: Develop data sources

Looking at our stem, there are several pieces of content that can safely change from variation to variation. The names Ben and Lucy should change each time. The fruit that they pick is also a good candidate for a random choice. It doesn’t even have to be picking fruit each time. Maybe they are catching fish from a pond or sharpening pencils in a drawer. Just be careful not to paint yourself into a corner. Feel free to try out a different scenario. In this example, however, we’re going to stick with fruit to be safe.

Therefore our data sources will be a list of names and a list of fruits that we can pull from at random. To do that we need to store these lists in variables. Click New Variable, call it “names”, select the List variable type, and click Create.

Then use the + button to add items to your list. Add as many names as you would like.

Do the same for fruits.

## Step Five: Define dynamic variables

So far there is nothing dynamic about these two lists. They remain the same from variation to variation. We need to instruct our item to pull two names and one fruit at random.

Let’s start with a fruit. Make a new variable called “fruit” and give it the type Random Choice from Variable. Then select fruits from the dropdown. This variable will now be a randomly chosen fruit from the list. You can use it as many times in your item as you would like, which is good because the word “apples” appears five times in our stem alone.

Repeat this process twice for your two names. Call them name1 and name2, selecting names from the dropdown in both cases. Also make sure to check “Ignore previous selections”. This will ensure that it doesn’t randomly choose the same name twice.

So far all we have changed is the appearance of the item. It is still basically asking 12 + 19 – 10. Let’s replace each of these numbers with a randomly generated one. The Random Number variable type allows you to generate a random number between minimum and maximum values. The first two numbers are easy. Let’s create two more variables, num1 and num2, and make them each a Random Number between 5 and 30.

The third number is a little trickier. We can’t just generate another random number between 5 and 30 because what if num3 is greater than the sum of num1 and num2. That would result in there being more rotten pieces of fruit than the total number picked.

We could play it safe and select a number between 1 and 10 because we know num1 and num2 have minimum values of 5 each for a minimum total fruit picked of 10, but we want our item to require more difficult subtraction than that. Therefore, we need to pick a random number between 1 and the sum of num1 and num2.

Create a new variable, call it sum, and select the Formula variable type. To add your two variables together, click “Select variable” and select num1 from the dropdown. Then click the sum operator (+) and select num2 in the field that pops up. The sum of these two values, whatever they are, will now be stored in the sum variable.

Now we are ready to generate our third random number. Create a Random Number variable called num3. Set the minimum value to 1. For the maximum value, click “Select variable”. This will allow you to use a value stored in a variable instead of entering a fixed number value. Select “sum” from the dropdown. Your num3 variable will now be a random number between 1 and the sum of num1 and num2.

## Step Six: Replace content in your static shell with dynamic variables

Here is when you’ll start to see your item take shape. To include these variables in your item, all you have to do is drag them from the list into your stem to replace the static content. It should look something like this:

Let’s pause for a minute and preview the results. Click the preview button several times. You’ll see that the variables within the stem change each time it is previewed.

## Step Seven: Set your correct and incorrect options

You have now built a dynamic stem, but you don’t yet have any options to go with it. To create the correct option, use the Formula type and use the interface to create a variable that is num1 + num2 – num3.

In the right pane, beneath your stem, click the + button to add an option, set it as correct, and then drag your correct variable into the Option Text field.

The incorrect options are up to you. You can use the Formula type to create more variables derived from your correct option. Here are some examples that might make good distractors:

- sum
- sum + num3
- correct + 1
- correct – 1

Just be careful that you don’t return a negative number or inadvertently arrive at the same value as your correct option!

More advanced users might want to ensure that their correct option isn’t always the second or third greatest value in the option list. If your administration system allows it, you can have it randomly select incorrect options from a much larger pool. If not, you can use the Code variable type to write slightly more complicated distractors that randomize whether or not each correct option is greater or less than your correct option.

Here are some code snippets that you can enter into the Code type to make good incorrect options:

- if (Math.random() > .5) {

correct + 1;

} else {

correct – 1;

} - correct – 2 >= 0 ? correct – 2 : correct + 2
- num2 !== correct ? num2 : correct + 3

When you’re finished, your item will look something like this:

If you created this item in Scorpion, you can preview it in action by closing the SmartItem Editor and clicking the preview button. If you’ve followed all the steps, it should be different each time and should be scoring correctly.

## Comments

0 comments

Article is closed for comments.