diff --git a/main/newscorm/js/api_wrapper.js b/main/newscorm/js/api_wrapper.js index ac882e2e93..4efb95a3e9 100644 --- a/main/newscorm/js/api_wrapper.js +++ b/main/newscorm/js/api_wrapper.js @@ -15,6 +15,19 @@ var _debug = false; var findAPITries = 0; var _apiHandle = null; //private variable var errMsgLocate = "Unable to locate the LMS's API implementation"; + +var _NoError = 0; +var _GeneralException = 101; +var _ServerBusy = 102; +var _InvalidArgumentError = 201; +var _ElementCannotHaveChildren = 202; +var _ElementIsNotAnArray = 203; +var _NotInitialized = 301; +var _NotImplementedError = 401; +var _InvalidSetValue = 402; +var _ElementIsReadOnly = 403; +var _ElementIsWriteOnly = 404; +var _IncorrectDataType = 405; /** * Gets the API handle right into the local API object and ensure there is only one. * Using the singleton pattern to ensure there's only one API object. @@ -400,25 +413,24 @@ var questions_types = new Array(); */ function checkAnswers(interrupted) { - alert('Test'); var tmpScore = 0; + var status = 'not attempted'; for(var i=0; i mastery_score) + { + status = 'passed'; + } + else + { + status = 'failed'; + } + doLMSSetValue('cmi.core.lesson_status',status); if((interrupted==true) && (status != 'completed') && (status != 'passed')) {