This is one part of the Verona Online Assessment Standards. All messages are sent via the postMessage function of the html page. The player takes the page root of its parent as target (parent.window), and the application binds the function call to the iframe element of the player.
Most important, the message body carries as first parameter the operationId of the message.
The html page MUST contain a script-tag with metadata. The syntax and structure of this data are described here.
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",
"enabledNavigationTargets": [
"next"
],
"startPage": "page5",
"directDownloadUrl": "https://www.iqb-testcenter.de/download/iskeid-34e845-didmmemdkek"
}
}
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": "2021-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"
},
"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",
"enabledNavigationTargets": [
"next"
],
"startPage": "page5",
"directDownloadUrl": "https://www.iqb-testcenter.de/download/iskeid-34e845-didmmemdkek"
}
}
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'"
}
Window Focus Changed Notification
In some use cases like exam mode the host must know whether the host or the player has the window's focus. If none of these windows have the focus (i. e. the testee has left the test), some logging or warning could be necessary. The player should listen to the window events 'blur' and 'focus'.
Accepts the following message:
{
"timeStamp": "2021-11-15T10:22:25Z",
"hasFocus": true
}
The player can send any information about events happening during the interaction phase.
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).