This is one part of the TBA Plugin Standards.
Ready Notification
The editor announces that it's code is loaded and initialized so the communication can start.
Accepts the following message:
{
"metadata": "string"
}
Start Command
The application sends parameters for editing the unit and commands the start of user interaction.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"unitDefinition": "iqb-scripted::1.4.0\ntitle::Testscript Title2??Hilfetext2\nmultiple-choice::mc_var1::1::Multiple Choice Feld: ::Choice1##Choice2##Choice3??Hilfetext1\ndrop-down::dd_var1::1::Dropdown Feld: ::Choice1##Choice2##Choice3??Hilfetext1\ncheckbox::check_var1::0::Ja klick mal!\nif-start::dd_var1::1\n input-text::java::sap oxa\nif-else\n input-text::java_22::sap oxa U\n text::NOT Choice1\nif-end\n",
"unitDefinitionType": "iqb-scripted@1.4.0",
"editorConfig": {
"directDownloadUrl": "https://www.iqb-studio.de/download/iskeid-34e845-didmmemdkek",
"role": "GUEST",
"sharedParameters": [
{
"key": "KEYBOARD_USE",
"value": "INTERNAL_ONLY"
}
]
}
}
Definition Changed Notification
The definition of the unit has changed.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"timeStamp": "2019-08-24T14:15:22Z",
"unitDefinition": "string",
"unitDefinitionType": "iqb-scripted@1.4.0",
"variables": [
{
"id": "string",
"alias": "string",
"type": "STRING",
"format": "TEXT_SELECTION",
"multiple": false,
"nullable": false,
"values": [
{
"value": "string",
"label": "string"
}
],
"valuePositionLabels": [
"string"
],
"valuesComplete": false
}
],
"dependenciesToPlay": [
{
"id": "GeoGebra.itcr.zip",
"type": "FILE"
}
],
"dependenciesToEdit": [
{
"id": "GeoGebra.itcr.zip",
"type": "FILE"
}
],
"sharedParameters": [
{
"key": "KEYBOARD_USE",
"value": "INTERNAL_ONLY"
}
]
}
The session id flags all communication. If a message has no or empty session id, it's not processed. The session id is unique and was generated by the application. Any simple algorithm would work. The session id helps to link the correct unit with the data of the message. Using the id of the editor hosting html element is less reliable, because the element could be reused with another unit.