Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-18023

Get cmi.core.score.raw returns an empty string

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.3
    • 1.8.9, 1.9.5
    • SCORM
    • None
    • Production : Ubuntu Server, Linux capturator 2.6.15-52-server, PHP Version 5.1.2, MySQL 5.0.22
      Tested also on Windows XP PHP Version 5.2.1 MySQL: 5.0.27
    • MySQL
    • MOODLE_19_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

    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

      Attachments

        Activity

          People

            piers Piers Harding
            marco.loche Marco Loche
            Dan Marsden Dan Marsden
            Dan Marsden, Matteo Scaramuccia, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              13/May/09