Sandbox: Difference between revisions
From MoodleDocs
m (Test table edit) |
Helen Foster (talk | contribs) (testing <code>) |
||
Line 18: | Line 18: | ||
|Test2 | |Test2 | ||
|} | |} | ||
==Functions and Examples== | |||
Following are the functions that constitute the basic log API for Moodle. | |||
<code> | |||
add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) | |||
user_accesstime_log($courseid=0) | |||
get_logs($select, array $params=null, $order='l.time DESC', $limitfrom='', $limitnum='', &$totalcount) | |||
get_logs_usercourse($userid, $courseid, $coursestart) | |||
get_logs_userday($userid, $courseid, $daystart) | |||
</code> | |||
The basic working of these functions can be categorized in two categories:- | |||
# Adding data to logs | |||
# Fetching data from logs | |||
Let us take a deeper look into both of these:- |
Revision as of 09:16, 29 May 2014
Test page for docs
Testing email notification
-Test-
Col1 | Col2 |
---|---|
Test1 | Test2 |
Test1 | Test2 |
Test1 | Test2 |
Functions and Examples
Following are the functions that constitute the basic log API for Moodle.
add_to_log($courseid, $module, $action, $url=, $info=, $cm=0, $user=0)
user_accesstime_log($courseid=0)
get_logs($select, array $params=null, $order='l.time DESC', $limitfrom=, $limitnum=, &$totalcount)
get_logs_usercourse($userid, $courseid, $coursestart)
get_logs_userday($userid, $courseid, $daystart)
The basic working of these functions can be categorized in two categories:-
- Adding data to logs
- Fetching data from logs
Let us take a deeper look into both of these:-