MDL-28387 logs: Rearranging the log record for readability
[moodle.git] / lib / db / log.php
CommitLineData
c6d75bff
PS
1<?php
2
3// This file is part of Moodle - http://moodle.org/
4//
5// Moodle is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Moodle is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17
18/**
19 * Definition of log events
20 *
21 * @package core
22 * @subpackage admin
23 * @copyright 2010 Petr Skoda (http://skodak.org)
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 */
26
27defined('MOODLE_INTERNAL') || die();
28
29global $DB; // TODO: this is a hack, we should really do something with the SQL in SQL tables
30
31$logs = array(
c6d75bff
PS
32 array('module'=>'course', 'action'=>'user report', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
33 array('module'=>'course', 'action'=>'view', 'mtable'=>'course', 'field'=>'fullname'),
34 array('module'=>'course', 'action'=>'update', 'mtable'=>'course', 'field'=>'fullname'),
35 array('module'=>'course', 'action'=>'enrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
36 array('module'=>'course', 'action'=>'unenrol', 'mtable'=>'course', 'field'=>'fullname'), // there should be some way to store user id of the enrolled user!
37 array('module'=>'course', 'action'=>'report log', 'mtable'=>'course', 'field'=>'fullname'),
38 array('module'=>'course', 'action'=>'report live', 'mtable'=>'course', 'field'=>'fullname'),
39 array('module'=>'course', 'action'=>'report outline', 'mtable'=>'course', 'field'=>'fullname'),
40 array('module'=>'course', 'action'=>'report participation', 'mtable'=>'course', 'field'=>'fullname'),
41 array('module'=>'course', 'action'=>'report stats', 'mtable'=>'course', 'field'=>'fullname'),
42 array('module'=>'message', 'action'=>'write', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
43 array('module'=>'message', 'action'=>'read', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
44 array('module'=>'message', 'action'=>'add contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
45 array('module'=>'message', 'action'=>'remove contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
46 array('module'=>'message', 'action'=>'block contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
47 array('module'=>'message', 'action'=>'unblock contact', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
48 array('module'=>'group', 'action'=>'view', 'mtable'=>'groups', 'field'=>'name'),
49 array('module'=>'tag', 'action'=>'update', 'mtable'=>'tag', 'field'=>'name'),
e11b8b16 50 array('module'=>'tag', 'action'=>'flag', 'mtable'=>'tag', 'field'=>'name'),
bf9f1bbd 51 array('module'=>'user', 'action'=>'view', 'mtable'=>'user', 'field'=>$DB->sql_concat('firstname', "' '" , 'lastname')),
c6d75bff 52);