[svn r12966] Added switch on mastery_score to adopt SCORM 1.2 recommandation fully (to support mastery_score, the LMS must be able change the status of the sco according to the real score)

skala
Yannick Warnier 18 years ago
parent 1af3cfc52f
commit 0521427c00
  1. 9
      main/newscorm/scorm_api.php

@ -497,9 +497,16 @@ function SetValue(param, val) {
function savedata(origin) { //origin can be 'commit', 'finish' or 'terminate'
<?php if ($autocomplete_when_80pct){ ?>
if( ( lesson_status == 'incomplete') && (score >= (0.8*max) ) ){
if ((lesson_status != 'completed') && (lesson_status != 'passed')
&& (mastery_score >=0) && (score >= mastery_score))
{
lesson_status = 'passed';
}
else if( (mastery_score < 0) && ( lesson_status == 'incomplete') && (score >= (0.8*max) ) )
{
lesson_status = 'completed';
}
<?php }?>
/*param = 'id='+lms_item_id+'&origin='+origin+'&score='+score+'&max='+max+'&min='+min+'&lesson_status='+lesson_status+'&time='+session_time+'&suspend_data='+suspend_data;

Loading…
Cancel
Save