Permitting plugins (simulations, matheditor etc.) to get and store answers


I have been building a number of plugins to display simulations, draw maps, display math etc. They all consist of an iframe:

<iframe src="" width="800" height="600"></iframe>

For examples, see

Many of these save what the student has created in one phase so that the student answer can be shown in a following phase.

I propose we extend the thinkspace tag to support this. Example:

<thinkspace name="field1" type="plug-in" src="" width="800" height="600"></thinkspace>

When the tag is displayed, it would be replaced by the iframe code. The plugin would have access to getAnswer() and putAnswer(answer) functions. These functions would get/put the answer stored in field1 and would use the existing code used to get/put student answers.


  • the plug-in only has access to the answer scoped to the space/case/phase/student/answer.
  • carry_forward is accomplished by using the same tag in another phase


I like the sound of this. We could then validate that the plug-in name is unique which would prevent collision or trampling of other plug-in data.

Seems to make a lot of sense. I’m still trying to think about how we’d restrict the usage of that to the name of the plug-in without explicitly specifying it. If you have any thoughts, let me know.


The name in the TS tag is not the name of the plugin but the name of the field just like a textfield or textarea. The only way a plugin could get data from another plugin is for the instructional designer to change the url of the TS tag after the student answered. If you wanted to restrict it, you could store the url (which should be unique) with the answer and only allow getAnswer to work if they were the same. Plugins have no TS context to work with.


I succeeded in getting MathQuill to appear in TS, allowing students to enter rather complex equations if they need to. This means that I should be able to take some of the code in my ProseMirror demo and use the TS tag mechanism for:

  • graphs, maps and charts using AmCharts
  • spreadsheets using Handsontable
  • anything with Easel
  • sky’s the limit

To make this fully functional we may want to consider a thinkspace tag with the following parameters:

<thinkspace name="xxx" type="plug-in" plugin_url="" data_url="" edit="true/false"></thinkspace>

name is the name of the answer field, data_url points to data to initially display (spreadsheet, map etc.) and edit lets student edit initial data if any. For carry_forward, edit=“false”. It would be easy enough to build a CKEditor plugin to prompt for this information. We may want to remove the iframe border with css.