Issue Details (XML | Word | Printable)

Key: MDL-12222
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Piers Harding
Reporter: Héctor Gomis
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Error adding cmi.session_time in SCORM 1.3

Created: 16/Nov/07 09:23 PM   Updated: 11/Nov/08 07:55 AM
Return to search
Component/s: SCORM
Affects Version/s: 1.9
Fix Version/s: 1.8.7, 1.9.3

Environment: All

Database: MySQL
Participants: Dan Marsden, Héctor Gomis and Piers Harding
Security Level: None
QA Assignee: Dan Marsden
Resolved date: 14/Aug/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_18_STABLE, MOODLE_19_STABLE


 Description  « Hide
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





 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Piers Harding added a comment - 01/Aug/08 07:21 AM
Hi Héctor - are you able to test this, so that I can look at back porting it?

Thanks,
Piers Harding.


Piers Harding added a comment - 14/Aug/08 07:33 AM
This has been commited in HEAD, 1.9, and 1.8.

Dan Marsden added a comment - 11/Nov/08 07:55 AM
closing - thanks for the report.