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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.8.9, 1.9.5
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      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
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      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

            • Assignee:
              piers Piers Harding
              Reporter:
              marco.loche Marco Loche
              Tester:
              Dan Marsden
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Mihail Geshoski, Peter Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                13/May/09