From 0521427c00da535073c5292001bcd98dd37a9ee4 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Sun, 9 Sep 2007 05:59:59 +0200 Subject: [PATCH] [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) --- main/newscorm/scorm_api.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main/newscorm/scorm_api.php b/main/newscorm/scorm_api.php index d41c4973dd..be9cd42875 100644 --- a/main/newscorm/scorm_api.php +++ b/main/newscorm/scorm_api.php @@ -497,9 +497,16 @@ function SetValue(param, val) { function savedata(origin) { //origin can be 'commit', 'finish' or 'terminate' - 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'; } + /*param = 'id='+lms_item_id+'&origin='+origin+'&score='+score+'&max='+max+'&min='+min+'&lesson_status='+lesson_status+'&time='+session_time+'&suspend_data='+suspend_data;