I am at the initial stage of developing a SCORM player using MVC ASP.Net. How to use SCORM in ASP.Net MVC. Please provide some assistance in developing the player on MVC Website. I also need help on the Integrating part. The following sample was taken from the web and it's working fine. I need to integrate this using ASP.NET MVC.
<HTML>
<head>
<script
src="https://ajax.googleapis.com/ajax/libs
/jquery/1.11.2/jquery.min.js"></script>
<script>
var API = {};
(function ($) {
$(document).ready(function () {
setupScormApi()
$('#content').attr('src',
"file:///E:/Projects/SCORM/Sample/SCORM%20-
%20Storyline%20output/story.html")
});
function setupScormApi() {
API.LMSInitialize = LMSInitialize;
API.LMSGetValue = LMSGetValue;
API.LMSSetValue = LMSSetValue;
API.LMSCommit = LMSCommit;
API.LMSFinish = LMSFinish;
API.LMSGetLastError = LMSGetLastError;
API.LMSGetDiagnostic = LMSGetDiagnostic;
API.LMSGetErrorString = LMSGetErrorString;
}
function LMSInitialize(initializeInput) {
displayLog("LMSInitialize: " + initializeInput);
return true;
}
function LMSGetValue(varname) {
displayLog("LMSGetValue: " + varname);
return "";
}
function LMSSetValue(varname, varvalue) {
displayLog("LMSSetValue: " + varname + "=" +
varvalue);
return "";
}
function LMSCommit(commitInput) {
displayLog("LMSCommit: " + commitInput);
return true;
}
function LMSFinish(finishInput) {
displayLog("LMSFinish: " + finishInput);
return true;
}
function LMSGetLastError() {
displayLog("LMSGetLastError: ");
return 0;
}
function LMSGetDiagnostic(errorCode) {
displayLog("LMSGetDiagnostic: " + errorCode);
return "";
}
function LMSGetErrorString(errorCode) {
displayLog("LMSGetErrorString: " + errorCode);
return "";
}
function displayLog(textToDisplay) {
var loggerWindow =
document.getElementById("logDisplay");
var item = document.createElement("div");
item.innerText = textToDisplay;
loggerWindow.appendChild(item);
var height = $('#logDisplay')[0].scrollHeight;
$('#logDisplay').scrollTop(height);
}
})(jQuery);
</script>
</head>
<body style="display: flex; flex-direction: inherit; align-items:
center; justify-content: center">
<iframe id="content" name="content" style="border: 1px solid
blue; flex: 11; align-self: stretch" frameborder="0"></iframe>
<div id="logDisplay" style="flex: 1; align-self: stretch; border:
1px solid red; padding: 5px; overflow-y: scroll;
overflow-x: hidden;">
</div>
</body>
</html>