Skip to content
This repository has been archived by the owner on Jun 2, 2020. It is now read-only.

Commit

Permalink
MOBILE-941 logging: Launch events in the folder module
Browse files Browse the repository at this point in the history
  • Loading branch information
jleyva committed Apr 27, 2015
1 parent db01538 commit 0aecc64
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions plugins/contents/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,10 @@ define(templates,function (sectionsTpl, contentsTpl, folderTpl, mimeTypes) {
var content = MM.db.get("contents", MM.config.current_site.id + "-" + contentId);
content = content.toJSON();

if (typeof content.instance == "undefined") {
content.instance = 0;
}

var data = {
"options[0][name]" : "",
"options[0][value]" : ""
Expand Down Expand Up @@ -504,6 +508,18 @@ define(templates,function (sectionsTpl, contentsTpl, folderTpl, mimeTypes) {
$(this).data("index"));
});

// Logging.
if (parseInt(content.instance) > 0) {
MM.moodleLogging(
'mod_folder_view_folder',
{
folderid: content.instance
},
function() {
MM.cache.invalidate();
}
);
}
},

infoContent: function(e, courseId, sectionId, contentId, index) {
Expand Down

0 comments on commit 0aecc64

Please sign in to comment.