Adds a on page load submission feature for all quiz taking/showing
pages. Also ensures that session_started events are only returned once
for a OQAAT event.
Closes CNVS-15665
Test Plan:
Approach #1:
- Take a quiz with the "?debug_js=1" flag to see that events are being
queued.
- Rapidly register events then submit (attempting to leave some
events in the buffer)
- Confirm that the pending events were actually recorded.
Approach #2:
- Generate a bunch of events by quickly scrolling the page, and
switching to and from the window, then leave the page
ASAP. Answering events are higher priority and probably won't be
stuck.
- Confirm some events are missing.
- Visit the quiz show page, then confirm that the events are now
known.
Change-Id: If0a95eda6fd6dd90590996dcf55fa2b680c41b21
Reviewed-on: https://gerrit.instructure.com/45733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>