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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.8.9, 1.9.5
    • 1.9.3
    • 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

      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

            piers Piers Harding (Inactive)
            marco.loche Marco Loche (Inactive)
            Dan Marsden Dan Marsden
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.