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

Error adding cmi.session_time in SCORM 1.3

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9
    • 1.8.7, 1.9.3
    • SCORM
    • None
    • All
    • MySQL
    • MOODLE_19_STABLE
    • 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

            piers Piers Harding
            hectorgomis Héctor Gomis
            Dan Marsden Dan Marsden
            Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              15/Oct/08