THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We edit the setOutcome method in learning_client.js from the TBD as follows:
Code Block | ||
---|---|---|
| ||
setOutcome : function(data, handler) { if ( handler === 'silent' ) handler = (function (result) { } ); if ( handler === undefined ) handler = (function (result) { if (result.error) { alert('Error, unable to send outcome to server.'); } } ) ; osapi.learning.setOutcome({'outcome' : data}).execute(handler); }, |
...
So that completes our look at a simple call to the server-side service to send some data.
Up Next: Understand Understanding Batch/Asynchronous Loading in a Gadget