Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * The mod_stickynotes "note created" event class.
19
 *
20
 * @package     mod_stickynotes
21
 * @copyright   2021 Olivier VALENTIN
22
 * @license     https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
namespace mod_stickynotes\event;
26
defined('MOODLE_INTERNAL') || die();
27
 
28
/**
29
 * The mod_stickynotes "note created" event class.
30
 *
31
 * @package     mod_stickynotes
32
 * @copyright   2021 Olivier VALENTIN
33
 * @license     https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 */
35
class note_created extends \core\event\base {
36
    /**
37
     * Init method.
38
     *
39
     * @return void
40
     */
41
    protected function init() {
42
        $this->data['crud']        = 'c';
43
        $this->data['edulevel']    = self::LEVEL_PARTICIPATING;
44
        $this->data['objecttable'] = 'stickynotes_note';
45
    }
46
 
47
    /**
48
     * Description of event.
49
     *
50
     * @return string
51
     */
52
    public function get_description() {
53
        return "The user with id '$this->userid' has created the note with id '$this->objectid'
54
 in the stickynote course module id '$this->contextinstanceid'.";
55
    }
56
 
57
    /**
58
     * Return localised event name.
59
     *
60
     * @return string
61
     */
62
    public static function get_name() {
63
        return get_string('eventnotecreated', 'mod_stickynotes');
64
    }
65
}