Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ __Content:__

## Change log

### Version 1.6.4 2018-03-22

Extension in sending slideExit event

- Added sending slideExit event necessary data

### Version 1.6.3 2016-06-29

Extension of provisioning API
Expand Down
51 changes: 28 additions & 23 deletions agnitio.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Has to be directly on window object
* @public
*/

window.setAgnitioPlatform = function(data) {
var info = JSON.parse(data);
window.agnitioInfo = info;
Expand All @@ -26,7 +27,7 @@ window.setAgnitioPlatform = function(data) {
// Create the global Agnitio namespace 'ag'
var ag = window.ag || {};

var api_version = '1.6.3',
var api_version = '1.6.4',
customInvoke = false,
appInterface = null,
ua = navigator.userAgent,
Expand Down Expand Up @@ -811,35 +812,39 @@ window.setAgnitioPlatform = function(data) {
* @private
*/
function slideExit () {

var data, now;

if (!currentSlideId) { return; }

now = timestamp();

data = {
type: "system",
categoryId: null,
category: "slideExit",
labelId: "id",
label: "name",
valueId: currentSlideId,
value: undefined,
valueType: undefined,
time: now,
slideIndex: undefined,
slidePath: undefined,
chapterName:undefined,
chapterId: undefined,
subChapterName: undefined,
subChapterId: undefined
var monitoringData,
now = timestamp(),
chapterName = currentData.chapter || null,
chapterId = currentData.chapterId || null,
subChapterName = currentData.subChapter || null,
subChapterId = currentData.subChapterId || null,
slideIndex = currentData.slideIndex || null,
slidePath = currentData.path || null,

monitoringData = {
type: "system",
categoryId: null,
category: "slideExit",
labelId: "id",
label: "name",
valueId: currentSlideId,
value: currentData.name,
valueType: null,
time: now,
slideIndex: slideIndex,
slidePath: slidePath,
chapterName: chapterName,
chapterId: chapterId,
subChapterName: subChapterName,
subChapterId: subChapterId
};

// Remove current slide
currentSlideId = null;

ag.submit.save(data);
ag.submit.save(monitoringData);
}

/**
Expand Down