2: 2014-05-14 (水) 16:53:51 iseki |
3: 2014-06-03 (火) 17:38:39 iseki |
| ** Log System [#bef0ca17] | | ** Log System [#bef0ca17] |
| *** DB [#h7179fc9] | | *** DB [#h7179fc9] |
| + | - http://docs.moodle.org/dev/Migrating_log_access_in_reports |
| - mdl_logstore_standard_log | | - mdl_logstore_standard_log |
| MariaDB [moodle_db]> show columns from mdl_logstore_standard_log; | | MariaDB [moodle_db]> show columns from mdl_logstore_standard_log; |
| 21 rows in set (0.00 sec) | | 21 rows in set (0.00 sec) |
| #br | | #br |
| + | |
| *** add_to_log() [#x9d24c14] | | *** add_to_log() [#x9d24c14] |
| - add_to_log() has been deprecated, please rewrite your code to the new events API | | - add_to_log() has been deprecated, please rewrite your code to the new events API |
| + | - http://docs.moodle.org/dev/Migrating_logging_calls_in_plugins |
| + | |
| + | |
| + | $event = \mod_wiki\event\page_updated::create( |
| + | array( |
| + | 'context' => $context, |
| + | 'objectid' => $wikipage->id, |
| + | 'relateduserid' => $userid, |
| + | 'other' => array( |
| + | 'newcontent' => $newcontent |
| + | ) |
| + | )); |
| + | $event->add_record_snapshot('wiki', $wiki); |
| + | $event->add_record_snapshot('wiki_pages', $wikipage); |
| + | $event->add_record_snapshot('wiki_versions', $version); |
| + | $event->trigger(); |
| + | |
| + | $params = array( |
| + | 'context' => $context, |
| + | 'objectid' => $post->id, |
| + | 'other' => array( |
| + | 'content' => $post->message, |
| + | 'pathnamehashes' => array_keys($files), |
| + | 'discussionid' => $post->discussion, |
| + | 'triggeredfrom' => $name, |
| + | ) |
| + | ); |
| + | $event = \mod_forum\event\assessable_uploaded::create($params); |
| + | $event->trigger(); |
| #br | | #br |