Picture of C E
cmi.suspend.data storing a lot of data
by C E - Thursday, 15 October 2015, 4:05 AM
 

Hello,

 

In cmi.suspend.data we are getting an overflow error in the database, we are not sure what is making this happen. Below is what is being stored in a javascript object before we store it in a database.

 

Any help would be awesome.

 

SCORM.data.get(cmi.suspend_data)  value: {"completion":"-1111011111111111111111111111111111111111111111000000----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------","questions":"","_isCourseComplete":false,"_isAssessmentPassed":false,"assessment":{"assessment-01":[1,1,18,5,{"c-175":false,"c-180":true,"c-185":false,"c-195":false,"c-205":false,"c-210":false,"c-220":true,"c-230":true,"c-245":true,"c-250":false,"c-255":false,"c-260":false,"c-265":true,"c-270":false}]}}

Picture of Paul MacIntyre
Re: cmi.suspend.data storing a lot of data
by Paul MacIntyre - Thursday, 15 October 2015, 8:10 AM
 

Hi C E

It looks as though you have a high value set for the _latestTrackingId. If you're using the framework to compile this, you can find it in the course.json. This id tells adapt how much room to allow for your suspend data, basically how many 1s and 0s to leave room for in this: {"completion":"-1111101111111111111111111111111111111111111111000000---

From the looks of yours a value of around 40 or so would make sense (I lost count of the 1s and 0s while checking).

Paul

Picture of Matt Leathes
Re: cmi.suspend.data storing a lot of data
by Matt Leathes - Thursday, 15 October 2015, 9:50 AM
 

If your course isn't live (i.e. you don't have any existing tracking data on the server to worry about) you can run $ grunt tracking-reset to fix this

If your course is live and you need to make sure any tracking data already stored on the server is still usable, Paul's method is best.

Picture of C E
Re: cmi.suspend.data storing a lot of data
by C E - Thursday, 15 October 2015, 12:23 PM
 

Thanks for the reply.

 

Your help is appreciated.

Picture of C E
Re: cmi.suspend.data storing a lot of data
by C E - Thursday, 15 October 2015, 12:27 PM
 

Thank you for the reply. I will try it out now.

 

Edit: Spelling error.