Moodle

Error adding cmi.session_time in SCORM 1.3

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major 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

Activity

Hide
Piers Harding added a comment -

Hi Héctor - are you able to test this, so that I can look at back porting it?

Thanks,
Piers Harding.

Show
Piers Harding added a comment - Hi Héctor - are you able to test this, so that I can look at back porting it? Thanks, Piers Harding.
Hide
Piers Harding added a comment -

This has been commited in HEAD, 1.9, and 1.8.

Show
Piers Harding added a comment - This has been commited in HEAD, 1.9, and 1.8.
Hide
Dan Marsden added a comment -

closing - thanks for the report.

Show
Dan Marsden added a comment - closing - thanks for the report.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: