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

Error adding cmi.session_time in SCORM 1.3

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.8.7, 1.9.3
    • Component/s: SCORM
    • Labels:
      None
    • Environment:
      All
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_18_STABLE, MOODLE_19_STABLE

      Description

      There is an error using SCORM 1.3 when you are saving "cmi.session" time in scorm. The error is focused in file "mod/scorm/datamodels/scorm_13.js.php", at function AddTime, around line 1020.

      When you are splitting the time format using a regular expresion, you are taking the wrong position of the array, and you are storing the minute value of the session in the hour and minute position of the database:

      (Original line)
      var hours = parseInt(firstarray[10],10)+parseInt(secondarray[10],10)+change; //Hours

      (Corrected line)
      var hours = parseInt(firstarray[9],10)+parseInt(secondarray[9],10)+change; //Hours

        Attachments

          Activity

            People

            Assignee:
            piers Piers Harding
            Reporter:
            hectorgomis Héctor Gomis
            Tester:
            Dan Marsden
            Participants:
            Component watchers:
            Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Oct/08