Hi all.
Before i post my doubts i already did try to remove that statements redifining the API methods. I already have some functions declared on VueJS methods hook but with no luck. In console i get the error
connection.initialize called.
SCORM.API.find: API found. Version: 1.2
API: [object Object]
vue.runtime.esm.js?dce0:619 [Vue warn]: Error in created hook (Promise/async): "TypeError: API.LMSInitialize is not a function"
found in
---> <CourseLearn> at src/views/courses/Learn.vue
<QPageContainer>
<Main> at src/layout/Main.vue
<QLayout>
<App> at src/App.vue
<Root>
TypeError: API.LMSInitialize is not a function
at Object.pipwerks.SCORM.connection.initialize [as init] (index.js?4d47:310)
at _callee$ (Learn.vue?1b24:426)
at tryCatch (runtime.js?750b:63)
at Generator.invoke [as _invoke] (runtime.js?750b:293)
at Generator.eval [as next] (runtime.js?750b:118)
at asyncGeneratorStep (asyncToGenerator.js?1da1:3)
at _next (asyncToGenerator.js?1da1:25)
at eval (asyncToGenerator.js?1da1:32)
at new Promise (<anonymous>)
at eval (asyncToGenerator.js?1da1:21)
All of this functions are declared in my methods hook:
LMSInitialize (parameter) {
console.log('LMSInitialize =>', parameter)
return 'true'
},
LMSGetValue (varname) {
console.log('LMSGetValue ==>', varname, 'value =>', this.window.API[varname])
return this.window.API[varname]
},
LMSSetValue (varname, varvalue) {
console.log('LMSSetValue => ', varname, varvalue, 'current value =>', this.window.API[varname])
this.window.API[varname] = varvalue
console.log('LMSSetValue => ', varname, varvalue, 'new value =>', this.window.API[varname])
return 'true'
},
LMSCommit (parameter) {
console.log('LMSCommit =>', parameter)
this.LMSGetValue('')
return 'true'
},
LMSFinish (parameter) {
console.log('LMSFinish =>', parameter)
return 'true'
},
LMSGetLastError (error) {
console.log('LMSGetLastError ==> ', error)
return 0
},
LMSGetDiagnostic (errorCode) {
console.log('LMSGetDiagnostic =>', errorCode)
return 'diagnostic string => ' + errorCode
},
LMSGetErrorString (errorstring) {
console.log('LMSGetErrorString ==>', errorstring)
return 'error string => ' + errorstring
},
So, can anybody help me to set this up? It seems that i'm not doing something in the right way but i didn't discover yet what it is... any help will be appreciated!
Best regards,
Miguel.