. /** * This file contains the customcert element studentname's core interaction API. * * @package customcertelement_studentname * @copyright 2013 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace customcertelement_studentname; defined('MOODLE_INTERNAL') || die(); /** * The customcert element studentname's core interaction API. * * @package customcertelement_studentname * @copyright 2013 Mark Nelson * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class element extends \mod_customcert\element { /** * Handles rendering the element on the pdf. * * @param \pdf $pdf the pdf object * @param bool $preview true if it is a preview, false otherwise * @param \stdClass $user the user we are rendering this for */ public function render($pdf, $preview, $user) { \mod_customcert\element_helper::render_content($pdf, $this, fullname($user)); } /** * Render the element in html. * * This function is used to render the element when we are using the * drag and drop interface to position it. * * @return string the html */ public function render_html() { global $USER; return \mod_customcert\element_helper::render_html_content($this, fullname($USER)); } }