Search code examples
scorm2004tin-can-apilearning-locker

Learning Locker and SCORM-to-xAPI-Wrapper


I have two versions of Learning Locker installed. In one version the statements are received however I can't view any of my previous statements as LL seems to be stuck

enter image description here

When I use my new version of LL, no statements are received however I do get a load of errors.

xapiwrapper.min.js:2 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. xapiwrapper.min.js:2 GET http://52.16.190.132/data/xAPI/activities/profile?activityId=http%3A%2F%2F1…fileId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Factivity-profile 404 (Not Found) xapiwrapper.min.js:2 XHR finished loading: GET "http://52.16.190.132/data/xAPI/activities/profile?activityId=http%3A%2F%2F1…fileId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Factivity-profile". xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/activities/profile?activityId=http%3A%2F%2F1…fileId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Factivity-profile". xapiwrapper.min.js:2 GET http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state 400 (Bad Request) xapiwrapper.min.js:2 XHR finished loading: GET "http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state". xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":"homePageis not a valid irl in account. ,Anaccountmust have anameand ahomePage.,agentis not a valid actorIdentifier in params. ","trace":"#0 \/var\/www\/learninglocker\/app\/controllers\/xapi\/BaseController.php(114): Controllers\\xAPI\\BaseController->validateValue('agent', Array, 'agent')\n#1 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(269): Controllers\\xAPI\\BaseController->requiredValue('agent', '{\"account\":{\"ho...', 'agent')\n#2 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(30): Controllers\\xAPI\\DocumentController->checkParams(Array, Array, Array)\n#3 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(68): Controllers\\xAPI\\DocumentController->getShowData()\n#4 \/var\/www\/learninglocker\/app\/controllers\/xapi\/BaseController.php(53): Controllers\\xAPI\\DocumentController->show()\n#5 \/var\/www\/learninglocker\/app\/controllers\/xapi\/BaseController.php(36): Controllers\\xAPI\\BaseController->get()\n#6 [internal function]: Controllers\\xAPI\\BaseController->selectMethod()\n#7 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php(231): call_user_func_array(Array, Array)\n#8 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php(93): Illuminate\\Routing\\Controller->callAction('selectMethod', Array)\n#9 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php(62): Illuminate\\Routing\\ControllerDispatcher->call(Object(Controllers\\xAPI\\StateController), Object(Illuminate\\Routing\\Route), 'selectMethod')\n#10 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(962): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), 'Controllers\\\\xAP...', 'selectMethod')\n#11 [internal function]: Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()\n#12 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php(109): call_user_func_array(Object(Closure), Array)\n#13 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(1028): Illuminate\\Routing\\Route->run(Object(Illuminate\\Http\\Request))\n#14 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(996): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))\n#15 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(776): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))\n#16 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(746): Illuminate\\Foundation\\Application->dispatch(Object(Illuminate\\Http\\Request))\n#17 \/var\/www\/learninglocker\/vendor\/asm89\/stack-cors\/src\/Asm89\/Stack\/Cors.php(51): Illuminate\\Foundation\\Application->handle(Object(Illuminate\\Http\\Request), 1, true)\n#18 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware.php(72): Asm89\\Stack\\Cors->handle(Object(Illuminate\\Http\\Request), 1, true)\n#19 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Queue.php(47): Illuminate\\Session\\Middleware->handle(Object(Illuminate\\Http\\Request), 1, true)\n#20 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Guard.php(51): Illuminate\\Cookie\\Queue->handle(Object(Illuminate\\Http\\Request), 1, true)\n#21 \/var\/www\/learninglocker\/vendor\/stack\/builder\/src\/Stack\/StackedHttpKernel.php(23): Illuminate\\Cookie\\Guard->handle(Object(Illuminate\\Http\\Request), 1, true)\n#22 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(642): Stack\\StackedHttpKernel->handle(Object(Illuminate\\Http\\Request))\n#23 \/var\/www\/learninglocker\/public\/index.php(49): Illuminate\\Foundation\\Application->run()\n#24 {main}"} )http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state 400 (Bad Request) xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state". xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":"homePageis not a valid irl in account. ,Anaccountmust have anameand ahomePage.,agentis not a valid actorIdentifier in params. ","trace":"#0 \/var\/www\/learninglocker\/app\/controllers\/xapi\/BaseController.php(114): Controllers\\xAPI\\BaseController->validateValue('agent', Array, 'agent')\n#1 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(269): Controllers\\xAPI\\BaseController->requiredValue('agent', '{\"account\":{\"ho...', 'agent')\n#2 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(30): Controllers\\xAPI\\DocumentController->checkParams(Array, Array, Array)\n#3 \/var\/www\/learninglocker\/app\/controllers\/xapi\/DocumentController.php(80): Controllers\\xAPI\\DocumentController->getShowData()\n#4 \/var\/www\/learninglocker\/app\/controllers\/xapi\/BaseController.php(38): Controllers\\xAPI\\DocumentController->store()\n#5 [internal function]: Controllers\\xAPI\\BaseController->selectMethod()\n#6 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php(231): call_user_func_array(Array, Array)\n#7 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php(93): Illuminate\\Routing\\Controller->callAction('selectMethod', Array)\n#8 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php(62): Illuminate\\Routing\\ControllerDispatcher->call(Object(Controllers\\xAPI\\StateController), Object(Illuminate\\Routing\\Route), 'selectMethod')\n#9 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(962): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request), 'Controllers\\\\xAP...', 'selectMethod')\n#10 [internal function]: Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}()\n#11 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php(109): call_user_func_array(Object(Closure), Array)\n#12 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(1028): Illuminate\\Routing\\Route->run(Object(Illuminate\\Http\\Request))\n#13 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php(996): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))\n#14 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(776): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))\n#15 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(746): Illuminate\\Foundation\\Application->dispatch(Object(Illuminate\\Http\\Request))\n#16 \/var\/www\/learninglocker\/vendor\/asm89\/stack-cors\/src\/Asm89\/Stack\/Cors.php(51): Illuminate\\Foundation\\Application->handle(Object(Illuminate\\Http\\Request), 1, true)\n#17 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Session\/Middleware.php(72): Asm89\\Stack\\Cors->handle(Object(Illuminate\\Http\\Request), 1, true)\n#18 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Queue.php(47): Illuminate\\Session\\Middleware->handle(Object(Illuminate\\Http\\Request), 1, true)\n#19 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Cookie\/Guard.php(51): Illuminate\\Cookie\\Queue->handle(Object(Illuminate\\Http\\Request), 1, true)\n#20 \/var\/www\/learninglocker\/vendor\/stack\/builder\/src\/Stack\/StackedHttpKernel.php(23): Illuminate\\Cookie\\Guard->handle(Object(Illuminate\\Http\\Request), 1, true)\n#21 \/var\/www\/learninglocker\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Application.php(642): Stack\\StackedHttpKernel->handle(Object(Illuminate\\Http\\Request))\n#22 \/var\/www\/learninglocker\/public\/index.php(49): Illuminate\\Foundation\\Application->run()\n#23 {main}"} )http://52.16.190.132/data/xAPI/activities/state?activityId=http%3A%2F%2F10.…D&stateId=http%3A%2F%2Fadlnet.gov%2Fxapi%2Fprofile%2Fscorm%2Fattempt-state xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )http://52.16.190.132/data/xAPI/statements jquery.min.js:4 XHR finished loading: GET "http://10.3.0.171/moodle/pluginfile.php/29/mod_scorm/content/12/models_html5/quiz.html".xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )http://52.16.190.132/data/xAPI/statements yui_combo.php?rollup/3.17.2/yui-moodlesimple.js&rollup/1426267206/mcore-debug.js:24186 XHR finished loading: GET "http://10.3.0.171/moodle/lib/yui/build/moodle-core-checknet/assets/checknet.txt?time=1426596376630". /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )http://52.16.190.132/data/xAPI/statements /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )http://52.16.190.132/data/xAPI/statements /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )http://52.16.190.132/data/xAPI/statements /moodle/pluginfile.php/29/mod_scorm/content/12/apiwrapper_2004.3rd.js:615 SetValue(cmi.total_time, PT71.07S) failed. 404: Data Model Element Is Read Only /moodle/pluginfile.php/29/mod_scorm/content/12/apiwrapper_2004.3rd.js:615 GetValue(cmi.exit) failed. 405: Data Model Element Is Write Only /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 POST http://52.16.190.132/data/xAPI/statements 400 (Bad Request) /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 XHR finished loading: POST "http://52.16.190.132/data/xAPI/statements". /moodle/pluginfile.php/29/mod_scorm/content/12/scorm-xapi/xapiwrapper.min.js:2 There was a problem communicating with the Learning Record Store. ( 400 | {"error":true,"success":false,"message":["testshould be a validLocker\XApi\IRIinstatement.actor.account.homePage"]} )

Anyone have any ideas?

Thanks

Stephen


Solution

  • It looks like the LRS is rejecting the statements because the agent object you're using in your requests is not valid. It looks like you're maybe using something like

    {
        "name": "test",
        "account": {
            "homePage": "test",
            "name": "test"
        },
        "objectType": "Agent"
    }
    

    Whereas to be valid you need to use something like:

    {
        "name": "test",
        "account": {
            "homePage": "http://example.com/test",
            "name": "test"
        },
        "objectType": "Agent"
    }
    

    If that's not the case, can you add the complete statement you ARE sending to your question. See this blog for more details on valid values for agents.

    You also might want to look at TinCanJS as an alternative JS library and SCORM Cloud as an additional LRS for testing content that doesn't work with Learning Locker so you can pin down if the problem is with the content or LRS.