我必须开发一种工具,用于从一个电子学习标准内容包自动转换到另一个,到目前为止,我已经考虑过 IMS 和 SCORM,但我并不完全理解开发自动转换工具的最佳理由是什么IMS 到 SCORM,反之亦然。我的意思是可以从这种工具中获得什么好处?这就是我在一篇技术论文中得到的原因。任何人都可以解释和澄清这一点,或者告诉我开发这样一个工具的一些充分理由:
我们可以推断出格式之间自动转换的效用。这种转换将允许在高度自动化的学习平台之间进行交互。” - 电子学习内容自动转换 作者 Guiterrez、Jose Maria 等人。
JavaScript(SCORM 包)
<script type="text/javascript">
<![CDATA[
var numQuestions = 2;
var rawScore = 0;
var actualScore = 0;
var question0;
var question1;
var key0 = 0;
var key1 = 1;
function getAnswer()
{
doLMSSetValue("cmi.interactions.0.id","key0b8");
doLMSSetValue("cmi.interactions.0.type","choice");
doLMSSetValue("cmi.interactions.0.correct_responses.0.pattern",
"0");
for (var i=0; i < 2; i++)
{
if (document.getElementById("quizForm8").key0b8[i].checked)
{
question0 = document.getElementById("quizForm8").key0b8[i].value;
doLMSSetValue("cmi.interactions.0.student_response",question0);
break;
}
}
doLMSSetValue("cmi.interactions.1.id","key1b8");
doLMSSetValue("cmi.interactions.1.type","choice");
doLMSSetValue("cmi.interactions.1.correct_responses.0.pattern",
"1");
for (var i=0; i < 2; i++)
{
if (document.getElementById("quizForm8").key1b8[i].checked)
{
question1 = document.getElementById("quizForm8").key1b8[i].value;
doLMSSetValue("cmi.interactions.1.student_response",question1);
break;
}
}
}
function calcRawScore(){
if (question0 == key0)
{
doLMSSetValue("cmi.interactions.0.result","correct");
rawScore++;
}
else
{
doLMSSetValue("cmi.interactions.0.result","wrong");
}
if (question1 == key1)
{
doLMSSetValue("cmi.interactions.1.result","correct");
rawScore++;
}
else
{
doLMSSetValue("cmi.interactions.1.result","wrong");
}
}
function calcScore2()
{
computeTime(); // the student has stopped here.
document.getElementById("quizForm8").submitB.disabled = true;
getAnswer();
calcRawScore();
actualScore = Math.round(rawScore / numQuestions * 100);
alert("Your score is " + actualScore + "%")
doLMSSetValue( "cmi.core.score.raw", actualScore+"" );
var mode = doLMSGetValue( "cmi.core.lesson_mode" );
if ( mode != "review" && mode != "browse" ){
if ( actualScore < 50 )
{
doLMSSetValue( "cmi.core.lesson_status", "failed" );
}
else
{
doLMSSetValue( "cmi.core.lesson_status", "passed" );
}
doLMSSetValue( "cmi.core.exit", "" );
}
exitPageStatus = true;
doLMSCommit();
doLMSFinish();
}
]]>
</script>
HTML
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<!-- Other Code -->
<body>
<div id="outer">
<div class="QuizTestIdevice" id="id8">
<script src="calculate.js" type="text/javascript"></script>
<form name="quizForm8" id="quizForm8" action="javascript:calcScore2();">
<div class="iDevice_inner">
<div class="passrate" value="50"></div>
<div class="question">
<div id="taquestion0b8">
1> TEXT FOR QUESTION 1.
</div><br />
True<input type="radio" name="key0b8" value="0" id="taoptionAnswer0q0b8" />
False<input type="radio" name="key0b8" value="1" id="taoptionAnswer1q0b8" />
</div><br />
<div class="question">
<div id="taquestion1b8">
2> TEXT FOR QUESTION 2.
</div><br />
True<input type="radio" name="key1b8" value="0" id="taoptionAnswer0q1b8" />
False<input type="radio" name="key1b8" value="1" id="taoptionAnswer1q1b8" />
</div><br />
<input type="submit" name="submitB" value="SUBMIT ANSWERS" />
</div>
</form>
</div>
</div>
</body>
</html>
IMS 包的 Javascript 和 HTML
<html>
<body>
<div class="QuizTestIdevice" id="id8">
<script type="text/javascript">
<!-- //<![CDATA[
var numQuestions = 4;
var rawScore = 0;
var actualScore = 0;
var question0;
var question1;
var key0 = 0;
var key1 = 1;
var key2 = 0;
var key3 = 0;
function getAnswer()
{
for (var i=0; i < 2; i++)
{
if (document.getElementById("quizForm8").key0b8[i].checked)
{
question0 = document.getElementById("quizForm8").key0b8[i].value;
break;
}
}
for (var i=0; i < 2; i++)
{
if (document.getElementById("quizForm8").key1b8[i].checked)
{
question1 = document.getElementById("quizForm8").key1b8[i].value;
break;
}
}
}
function calcRawScore(){
if (question0 == key0)
{
rawScore++;
}
if (question1 == key1)
{
rawScore++;
}
}
function calcScore2()
{
getAnswer();
calcRawScore();
actualScore = Math.round(rawScore / numQuestions * 100);
document.getElementById("quizForm8").submitB.disabled = true;
alert("Your score is " + actualScore + "%")
}
//]]> -->
</script>
<form name="quizForm8" id="quizForm8" action="javascript:calcScore2();">
<div class="iDevice emphasis1">
<img alt="" class="iDevice_icon" src="icon_question.gif" />
<span class="iDeviceTitle">SCORM Quiz</span>
<div class="iDevice_inner">
<div class="passrate" value="50"></div>
<div class="question">
<div id="taquestion0b8" class="block" style="display:block">1> QUESTION 1
</div><br/>
<table><tr><td><input type="radio" name="key0b8" value="0" />
</td><td>
<div id="taoptionAnswer0q0b8" class="block" style="display:block">True
</div></td></tr>
<tr><td><input type="radio" name="key0b8" value="1" />
</td><td>
<div id="taoptionAnswer1q0b8" class="block" style="display:block">False
</div>
<br/><input type="submit" name="submitB" value="SUBMIT ANSWERS"/>
</form>
</body>
</html>
感谢您!