Add logging queries
This commit is contained in:
parent
7257ba1985
commit
2203ecd69c
2 changed files with 5 additions and 0 deletions
|
@ -263,3 +263,6 @@ class Vessel:
|
|||
def getCourseModuleCompletion(self, moduleid: int):
|
||||
results = list(self.db._execute(QUERY_MODULE_COMPLETION, (moduleid,), ctype=DictCursor))
|
||||
return results
|
||||
|
||||
def writeLog(self, event, data):
|
||||
self.db._execute(QUERY_LOG_INSERT, (event, data))
|
|
@ -26,4 +26,6 @@ QUERY_COURSE_FIELDS = "SELECT * FROM mdl_customfield_category cat JOIN mdl_custo
|
|||
QUERY_COURSE_MODULES = "SELECT * FROM mdl_course_modules WHERE course = %s"
|
||||
QUERY_MODULE_COMPLETION = "SELECT * FROM mdl_course_modules_completion WHERE coursemoduleid = %s"
|
||||
|
||||
QUERY_LOG_INSERT = "INSERT INTO mdl_logstore_standard_log(eventname, other, origin) VALUES (%s, %s, 'monster')"
|
||||
|
||||
QUERY_WHERE_TIMESTAMPS = "WHERE %(column)s >= %(after)i AND %(column)s < %(before)i"
|
||||
|
|
Loading…
Reference in a new issue