-
Notifications
You must be signed in to change notification settings - Fork 0
EndMessage
Stefaan Ternier edited this page Dec 5, 2015
·
5 revisions
An EndMessage is message that is shown at the end of the game. The game end is typically defined by a dependency (e.g. a Time dependency - 40 minutes after the game was started).
As the message is defined now, it enables two functions:
- Issue a final sync. The user is instructed to find a place with Internet connection and sync all responses to the server.
- Show a reset button. With pressing this button, the user is logged out on the mobile device so that a new session can be created. (see e.g. Mijn Stad)
The corresponding EndMessage java bean documents the metadata that is represented by this message:
- syncNecessary: documents whether a final sync is necessary. If this is set to true, the client must check if all actions/responses are synced with the server. If not a screen must be shown with a rich text and a button to start the manual syncing
- richTextSyncNotReady the rich text that is shown when actions/responses are not yet synced with the server
- syncButtonText the label of the button that starts the sync process
- showReset: documents whether a user should be able to reset the game now. This message part of the message is shown when either (syncNecessary == false) or when all actions/responses have been synced succesfully. If set to true a message is shown with:
- resetText the label of the button that resets the game
- richTextSyncReady the rich text to display on this page
The following json exemplifies the representation of this message
{
"type": "org.celstec.arlearn2.beans.generalItem.EndMessage",
"gameId": 1234,
"deleted": false,
"lastModificationDate": 1448030501072,
"id": 12345,
"sortKey": 0,
"scope": "user",
"name": "Gefeliciteerd!",
"description": "Je hebt alle opdrachten opgelost.\nHier kom straks een scherm om resultaten op te laden",
"dependsOn": {
"type": "org.celstec.arlearn2.beans.dependencies.AndDependency",
"dependencies": [
{
"type": "org.celstec.arlearn2.beans.dependencies.ActionDependency",
"action": "answer_correct",
"generalItemId": 5678
},
{
"type": "org.celstec.arlearn2.beans.dependencies.ActionDependency",
"action": "answer_correct",
"generalItemId": 6789
},
{
"type": "org.celstec.arlearn2.beans.dependencies.ActionDependency",
"action": "answer_correct",
"generalItemId": 9012
}
]
},
"autoLaunch": false,
"showCountDown": false,
"roles": [],
"fileReferences": [],
"syncNecessary": true,
"syncButtonText": "verstuur",
"showReset": true,
"resetText": "start opnieuw",
"title": "Gefeliciteerd",
"richTextSyncReady": "<center><p>Je hebt de interactieve wandeling <b>Mijn Stad</b> met succes volbracht.</p><p>We hebben een overzicht van jouw opdrachten en antwoorden naar het opgegeven emailadres gestuurd. </p><p>Wil je de route nog een keer lopen? Met de button hieronder kun je de wandeling herstarten.</p></center>",
"richTextSyncNotReady": "<center><p>Je hebt de interactieve wandeling <b>Mijn Stad</b> met succes volbracht.</p><p>Omdat je op dit moment geen internet verbinding hebt hebben we het overzicht van jouw opdrachten en antwoorden nog niet kunnen versturen</p><p>Maak verbinding met een Wifi netwerk en klik op de button hieronder.</p></center>"
}