-
-
Save ynishi2014/4eb9a00dff3ff867d51192548471a919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
let API = false; | |
let win; | |
for (win = window; win.API == null && win.parent != null && win.parent != win; win = win.parent); | |
if(win.API){ | |
API = win.API; | |
console.log("API found"); | |
let ret = API.LMSInitialize(""); | |
if(ret){ | |
console.log("API is successfully initialized."); | |
API.LMSSetValue("cmi.core.lesson_status", "passed"); | |
let ret2 = API.LMSFinish(""); | |
if(ret2){ | |
console.log("API is successfully finished."); | |
} else { | |
console.log("API finalization failed."); | |
} | |
}else{ | |
console.log("API initialization failed."); | |
} | |
}else{ | |
console.log("API not found"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment