Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 6039ec2

Browse files
committed
Move logging definitions into runestonebase.js
1 parent bb3210e commit 6039ec2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

runestone/common/js/runestonebase.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,19 @@ function RunestoneBase () { // Basic parent stuff
22

33
}
44

5-
RunestoneBase.prototype.logBookEvent = function (info) {
6-
console.log("logging event " + this.divid);
5+
RunestoneBase.prototype.logBookEvent = function (eventInfo) {
6+
eventInfo.course = eBookConfig.course;
7+
if (eBookConfig.logLevel > 0) {
8+
jQuery.get(eBookConfig.ajaxURL + 'hsblog', eventInfo); // Log the run event
9+
}
10+
console.log("logging event " + eventInfo);
711
};
812

913
RunestoneBase.prototype.logRunEvent = function (info) {
10-
console.log("running " + this.divid);
14+
eventInfo.course = eBookConfig.course;
15+
if (eBookConfig.logLevel > 0) {
16+
jQuery.post(eBookConfig.ajaxURL + 'runlog', eventInfo); // Log the run event
17+
}
18+
console.log("running " + eventInfo);
1119
};
20+

0 commit comments

Comments
 (0)