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 the customcert module for 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
 * This file contains the customcert element studentname's core interaction API.
19
 *
20
 * @package    customcertelement_studentname
21
 * @copyright  2013 Mark Nelson <markn@moodle.com>
22
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
23
 */
24
 
25
namespace customcertelement_studentname;
26
 
27
/**
28
 * The customcert element studentname's core interaction API.
29
 *
30
 * @package    customcertelement_studentname
31
 * @copyright  2013 Mark Nelson <markn@moodle.com>
32
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 */
34
class element extends \mod_customcert\element {
35
 
36
    /**
37
     * Handles rendering the element on the pdf.
38
     *
39
     * @param \pdf $pdf the pdf object
40
     * @param bool $preview true if it is a preview, false otherwise
41
     * @param \stdClass $user the user we are rendering this for
42
     */
43
    public function render($pdf, $preview, $user) {
44
        \mod_customcert\element_helper::render_content($pdf, $this, fullname($user));
45
    }
46
 
47
    /**
48
     * Render the element in html.
49
     *
50
     * This function is used to render the element when we are using the
51
     * drag and drop interface to position it.
52
     *
53
     * @return string the html
54
     */
55
    public function render_html() {
56
        global $USER;
57
 
58
        return \mod_customcert\element_helper::render_html_content($this, fullname($USER));
59
    }
60
}