Sending data to moodle database

Sending data to moodle database

by Carlos Andres -
Number of replies: 0

Hi:

I have a couple of scripts (JavaScript files APIWrapper.js and SCOFunctions.js) which sends tracking data from a quiz, lesson, etc., to moodle database, specifically the staying time for now. I have a lesson that sends to the browser (it means to javascript functions in the browser) some tracking data, as follows: times of staying per page, times of audio (this two sent values when a page of the lesson is leaved), time of entering (sent when the lesson begins), time of leaving (sent when the student leaves the lesson), timeOut if any (sent when the student doesn't register any activity during 10 minutes), among others. I created some functions in Javascript that are triggered when each of the named events occur and capture the data sent by the lesson file.

The question is: How do I do to make Moodle capture these values from Javascript and store them in the data base so the tracking can be done? Do I have to create new fields in the Moodle database? What modifications I must do in the JavaScript files APIWrapper.js and SCOFunctions.js that are included in the SCORM package to achieve this?

I thank beforehabd your help!

Carlos Andres

Average of ratings: -