This is one part of the TBA Plugin Standards.
Ready Notification
The player 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 running the unit and commands the start of user interaction.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"unitDefinition": "iqb-scripted::1.4.0 title::Testscript Title2??Hilfetext2 multiple-choice::mc_var1::1::Multiple Choice Feld: ::Choice1##Choice2##Choice3??Hilfetext1 drop-down::dd_var1::1::Dropdown Feld: ::Choice1##Choice2##Choice3??Hilfetext1 checkbox::check_var1::0::Ja klick mal! if-start::dd_var1::1 input-text::jajaj::sap osjxapsoxa if-else input-text::jajaj22::sap osjxapsoxa UUUU text::NOT Choice1 if-end",
"unitDefinitionType": "iqb-scripted@1.4.0",
"unitState": {
"dataParts": {
"page1": "{\"a\": 1, \"b\": 233}",
"page2": "{\"c\": \"sehr gut!\", \"d\": true}"
},
"presentationProgress": "NONE",
"responseProgress": "SOME",
"unitStateDataType": "iqb-standard@2.1.2"
},
"playerConfig": {
"unitNumber": "14",
"unitTitle": "Ein wunderbarer Ausflug",
"unitId": "M24093EX",
"logPolicy": "LEAN",
"pagingMode": "CONCAT_SCROLL",
"printMode": "OFF",
"elementsToHighlight": [
"string"
],
"enabledNavigationTargets": [
"NEXT"
],
"startPage": "page5",
"directDownloadUrl": "https://www.iqb-testcenter.de/download/iskeid-34e845-didmmemdkek",
"sharedParameters": [
{
"key": "KEYBOARD_USE",
"value": "INTERNAL_ONLY"
}
]
}
}
State Changed Notification
The state of the unit and/or of the player has changed. Some logs entries might be sent.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"timeStamp": "2027-11-15T10:22:25Z",
"unitState": {
"dataParts": {
"page1": "{\"a\": 1, \"b\": 233}",
"page2": "{\"c\": \"sehr gut!\", \"d\": true}"
},
"presentationProgress": "NONE",
"responseProgress": "SOME",
"unitStateDataType": "iqb-standard@2.1.2"
},
"playerState": {
"validPages": [
{
"id": "p1",
"label": "start"
},
{
"id": "p3",
"label": "on the beach"
}
],
"currentPage": "p3",
"sharedParameters": [
{
"key": "KEYBOARD_USE",
"value": "INTERNAL_ONLY"
}
]
},
"log": [
{
"timeStamp": "2021-11-15T10:22:25Z",
"key": "UNIT_NAVIGATION_FAILED",
"content": "{\"unitId\": \"M24093EX\", \"reason\": \"responsesIncomplete\"}"
}
]
}
Player Config Changed Notification
The host wants the player to update its configuration given at start.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"playerConfig": {
"unitNumber": "14",
"unitTitle": "Ein wunderbarer Ausflug",
"unitId": "M24093EX",
"logPolicy": "LEAN",
"pagingMode": "CONCAT_SCROLL",
"printMode": "OFF",
"elementsToHighlight": [
"string"
],
"enabledNavigationTargets": [
"NEXT"
],
"startPage": "page5",
"directDownloadUrl": "https://www.iqb-testcenter.de/download/iskeid-34e845-didmmemdkek",
"sharedParameters": [
{
"key": "KEYBOARD_USE",
"value": "INTERNAL_ONLY"
}
]
}
}
Runtime Error Notification
The player had some trouble and the response process is at risk.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"code": "AUDIO_CORRUPT",
"message": "Was not able to play Element 'audio_4'"
}
Request widget dialog
The player calls for the execution of a widget.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"callId": "string",
"widgetType": "CALC",
"parameters": [
{
"key": "LAYOUT",
"value": "EXTENDED"
}
],
"state": "string"
}
Sends the return value of a widget call to the player.
Accepts the following message:
{
"sessionId": "idk8ur5jf9ru5jk",
"callId": "string",
"state": "string"
}
The player can send any information about events happening during the interaction phase.
This object structure is used to send parameters to a widget.
The player sends some information on pages (valid pages, current page).
These data stand for the answers and some additional information on the status of responding. Emitted by the player during the test, it is given back to the player on start to restore the former state.
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 player hosting html element is less reliable, because the element could be reused with another unit.
This data supplies some information or instruction about this specific run of the unit (number, unit title, some behavioral data for the player).