edx/edx-platform — pull request #3630 by sefk (2014-05-07 00:33:50+00:00)
Title: WIP: add continue_video tracking log event

Looking for feedback from PM's in general; @dianakhuang and others on the LMS team; @vaxXxa or @valera-rozuvan or others from Ukraine who own the video player code; and @rocha on the analytics side. Also mentioning @jinpa and @jbau.

If this is worth doing, then we'll write tests of course, although I might need help knowing how to do this!

-------------------------------------

Every minute write a new "continue_video" event to the tracking log
to show someone who is still watching a video.

This will create a new event that looks like this example below. Note
the first one is a normal play_video event, as before. This is logged
at T00:20:47.3. The second event is the new continue_video event,
logged at T00:21:47.4. Given that the event timer only fires every
200ms, it is hard to be more precise than this.

{"username": "sefkloninger", "event_type": "play_video", "ip": "10.0.2.2", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36", "host": "precise64", "session": "0999c1c1537a349df85fa9910dde7d72", "event": "{\"id\":\"i4x-EarthSciences-GP202-video-28482542a1204534b2147cab5938243d\",\"currentTime\":765,\"code\":\"4sfhf7nY36M\"}", "event_source": "browser", "context": {"username": "sefkloninger", "user_id": 20, "ip": "10.0.2.2", "org_id": "EarthSciences", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36", "host": "precise64", "session": "0999c1c1537a349df85fa9910dde7d72", "course_id": "EarthSciences/GP202/Spring2014", "path": "/event"}, "time": "2014-05-07T00:20:47.309444+00:00", "page": "http://localhost:8000/courses/EarthSciences/GP202/Spring2014/courseware/044b19bb975c4ef9a3c1437bff4e9eef/6599511df6da461d967e4998a297299c/"}
{"username": "sefkloninger", "event_type": "continue_video", "ip": "10.0.2.2", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36", "host": "precise64", "session": "0999c1c1537a349df85fa9910dde7d72", "event": "{\"id\":\"i4x-EarthSciences-GP202-video-28482542a1204534b2147cab5938243d\",\"currentTime\":825.094622,\"code\":\"4sfhf7nY36M\"}", "event_source": "browser", "context": {"username": "sefkloninger", "user_id": 20, "ip": "10.0.2.2", "org_id": "EarthSciences", "agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36", "host": "precise64", "session": "0999c1c1537a349df85fa9910dde7d72", "course_id": "EarthSciences/GP202/Spring2014", "path": "/event"}, "time": "2014-05-07T00:21:47.447614+00:00", "page": "http://localhost:8000/courses/EarthSciences/GP202/Spring2014/courseware/044b19bb975c4ef9a3c1437bff4e9eef/6599511df6da461d967e4998a297299c/"}