Details
Description
If a student get a score equal to zero and complete the attempt, moodle do not register it and when in the next attempt the SCOtry to retrieve this data (doLMSGetValue( "cmi.core.score.raw") )it gets an empty string.
The SCORM RunTime Environment allows the return of an empty string but only if there wasn't a previous attempt or the previous attempt didn't set it. (page 36 SCORM 1.2 RTE cmi.core.score.raw definition - "Usage")
Here an exemple, this is the copy of the trace from SCORM API debbuger,
First Attempt O get 0
Fri, 23 Jan 2009 13:10:37 UTC: LMSSetValue("cmi.core.lesson_status", "failed") => 0
Fri, 23 Jan 2009 13:10:37 UTC: LMSSetValue("cmi.suspend_data", "") => 0
Fri, 23 Jan 2009 13:10:37 UTC: LMSSetValue("cmi.core.score.raw", "0") => 0
Second attempt I set 13 , try to get previouse score : 0 should be retrieved but empty string returned
Fri, 23 Jan 2009 13:22:59 UTC: LMSGetValue("cmi.core.lesson_mode") - review => 0
Fri, 23 Jan 2009 13:22:59 UTC: LMSGetValue("cmi.core.lesson_status") - failed => 0
Fri, 23 Jan 2009 13:22:59 UTC: LMSGetValue("cmi.core.score.raw") - => 0 ====HERE THE PROBLEM=========
Fri, 23 Jan 2009 13:22:59 UTC: LMSSetValue("cmi.core.score.raw", "13") => 0
Third attempt i get 13 (it's ok!)
Fri, 23 Jan 2009 13:23:57 UTC: LMSGetValue("cmi.core.lesson_mode") - review => 0
Fri, 23 Jan 2009 13:23:57 UTC: LMSGetValue("cmi.core.lesson_status") - failed => 0
Fri, 23 Jan 2009 13:23:57 UTC: LMSGetValue("cmi.core.score.raw") - 13 => 0