Sunbird-Ed / SunbirdEd-portal

Web Portal for sunbird software. Provides the web interfaces for all functionality of Sunbird. Find the installation instructions at: https://ed.sunbird.org/use-1/install-locally/sunbirded-portal
MIT License
38 stars 306 forks source link

#bodhi timeStamp issue in OE_START and OE_END #161

Open kochhar opened 6 years ago

kochhar commented 6 years ago

@ajinkya-k commented on Sat Dec 16 2017

In the sunbird-portal telemetry, when OE_START is created and a corresponding OE_END is pushed to the TelemetryV2Manager._end queue, the time that is stored as ets in OE_START is different from the time that is stored in the queue OE_END event that is used to calculate the edata.eks.length when the OE_END event is actually fired. As a result, the actual time spent on the content is miscalculated. Ideally, OE_START ets must match with the startTime used for calculating OE_END edata.eks.length


@kochhar commented on Mon Dec 18 2017

Thanks for the bug report @ajinkya-k. Could you please submit a PR for the fix? Thanks!

ajinkya-k commented 6 years ago

@kochhar To solve this, the function prototype for TelemeteryEvent.start() will need to be changed to accept dateTime as an argument. Is that okay?

kochhar commented 6 years ago

I'm not sure I fully understand why the start time should be injected into the start function. The function can take the start time as the current time when the function is called.