'status': "cmi.core.lesson_status",
'session_time': 'cmi.core.session_time',
'success_status': '',
- 'exit':'cmi.core.exit',
+ 'exit': 'cmi.core.exit',
};
var _CMI2004 = {
'status': 'cmi.completion_status',
'session_time': 'cmi.session_time',
'success_status': 'cmi.success_status',
- 'exit':'cmi.exit',
+ 'exit': 'cmi.exit',
}
$(function () {
}
SCORM_INITED = true;
pipwerks.SCORM.init();
- pipwerks.SCORM.set('exit', 'suspend');
+ setScormValue('exit', 'suspend');
startScormTimer();
initScormEvents();
initScormInteractions();
n++;
}
}
- if (SCORM_WEIGHTING > 0) {
+ if (fluidbook.scorm.manageScore && SCORM_WEIGHTING > 0) {
pipwerks.SCORM.set('cmi.score.min', '0');
pipwerks.SCORM.set('cmi.score.max', SCORM_WEIGHTING);
- SCORM_SUCCESS_SCORE = parseFloat(pipwerks.SCORM.get('cmi.scaled_passing_score'));
+ SCORM_SUCCESS_SCORE = parseFloat(fluidbook.datas.scorm_score_min) / 100;
updateInteractionsScore();
}
setScormValue('cmi.interactions.' + number + '.id', id);
setScormValue('cmi.interactions.' + number + '.description', question);
setScormValue('cmi.interactions.' + number + '.type', type);
- setScormValue('cmi.interactions.' + number + '.correct_responses.0.pattern', correct_response);
- setScormValue('cmi.interactions.' + number + '.weighting', weighting);
+ if (fluidbook.scorm.manageScore) {
+ setScormValue('cmi.interactions.' + number + '.correct_responses.0.pattern', correct_response);
+ setScormValue('cmi.interactions.' + number + '.weighting', weighting);
+ }
SCORM_WEIGHTING += weighting;
}
var n = scormIdToN(id);
var currentTime = Math.round(new Date().getTime() / 1000);
var latency = getScormTimeInterval(SCORM_QUESTIONS[n].timestamp, new Date());
- if (result === undefined) {
- result = (learner_response === SCORM_QUESTIONS[n].correct_response);
+
+ if (fluidbook.scorm.manageScore) {
+ if (result === undefined) {
+ result = fluidbook.datas.scorm_quiz_as_questionnaire || (learner_response === SCORM_QUESTIONS[n].correct_response);
+ }
+ setScormValue('cmi.interactions.' + n + '.result', result ? 'correct' : 'incorrect');
}
- setScormValue('cmi.interactions.' + n + '.result', result ? 'correct' : 'incorrect');
setScormValue('cmi.interactions.' + n + '.learner_response', learner_response);
setScormValue('cmi.interactions.' + n + '.latency', latency);
}
function updateInteractionsScore() {
+ if (!fluidbook.scorm.manageScore) {
+ return;
+ }
var score = 0;
var answered = 0;
$.each(SCORM_QUESTIONS, function (n, q) {