Computation layer support page out of date

I started trying to learn how to do CL from this page:

I tried to follow the first Example under the heading “Example: Setting Initial Text”

It says to try this in the CL:

initialText: "I notice . . .

I wonder . . ."

This creates an error. I found the new way after a bit of searching the web. I moved on to the next Example under the heading “Example: Using a Number in a Graph”

I tried to follow the steps and again the language it was suggesting for CL seemed to be out of date.

I gave up with the document.

Where did you put the initialText: CL? It is used in the “explain” text box for components that can have them (i.e. math and free response, and multiple choice and multiple select components). So if you placed it in a graph or note component, for example, it won’t work because graphs don’t have explain prompts.

Side note: any example links you follow in the documentation already have the displayed code in the link you follow. This for example is already coded in the Free Response (labeled “Answer box”) in editing mode.

Thank you for your reply. I was using it in a math response box!

I just tried it now in a free response box and it worked.

To get text to display in a maths response box though, you say above that initialText should work. The CL accepts the instruction, but in preview I can’t see anything.

However if I use intialLatex I can see it.

Should I be able to use initialText? Or can that only show certain things?

Thank you!

For a Math Response, initialLatex: prefills the math response with whatever math expression you enter. initialText: prefills the “Explain your answer” box. You won’t see anything unless you check the box for “Ask student to explain their answer”

and an answer has been submitted, since that response box is intended to “explain their answer”.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.