Skip to content
Snippets Groups Projects
Select Git revision
  • 991fe7cc994f5aee85d04019d46a8606fc1b355c
  • master default
  • v0.52.5
  • v0.52.4
  • v0.52.3
  • v0.52.2
  • v0.52.1
  • v0.52.0
  • v0.51.0
  • v0.50.0
  • v0.49.0
11 results

defaults.yaml

Blame
  • renderer.php 4.70 KiB
    <?php
    // This file is part of Moodle - http://moodle.org/
    //
    // Moodle is free software: you can redistribute it and/or modify
    // it under the terms of the GNU General Public License as published by
    // the Free Software Foundation, either version 3 of the License, or
    // (at your option) any later version.
    //
    // Moodle is distributed in the hope that it will be useful,
    // but WITHOUT ANY WARRANTY; without even the implied warranty of
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    // GNU General Public License for more details.
    //
    // You should have received a copy of the GNU General Public License
    // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
    
    /**
     * @package   mod_pdfannotator
     * @copyright 2018 RWTH Aachen (see README.md)
     * @author    Rabea de Groot and Anna Heynkes
     * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
     *
     */
    defined('MOODLE_INTERNAL') || die();
    
    class mod_pdfannotator_renderer extends plugin_renderer_base {
    
        /**
         *
         * @param type $index
         * @return type
         */
        public function render_index($index) {
            return $this->render_from_template('pdfannotator/index', $index->export_for_template($this));
        }
        /**
         *
         * @param \templatable $statistic
         * @return type
         */
        public function render_statistic(\templatable $statistic) {
            $data = $statistic->export_for_template($this);
            return $this->render_from_template('mod_pdfannotator/statistic', $data);
        }
    
        /**
         * renders dropdown-actionmenu. Currently used on overview in the categories "answers" and "reports".
         * @param \templatable $dropdownmenu
         * @return type
         */
        public function render_dropdownmenu(\templatable $dropdownmenu) {
            $data = $dropdownmenu->export_for_template($this);
            return $this->render_from_template('mod_pdfannotator/dropdownmenu', $data);
        }
    
        /**
         * Render a table containing information about a comment the user wants to report
         *
         * @param pdfannotator_comment_info $info a renderable
         * @return string
         */
        public function render_pdfannotator_comment_info(pdfannotator_comment_info $info) {
            $o = '';
            $o .= $this->output->container_start('appointmentinfotable');
            $o .= $this->output->box_start('boxaligncenter appointmentinfotable');
    
            $t = new html_table();
    
            $row = new html_table_row();
            $cell1 = new html_table_cell(get_string('slotdatetimelabel', 'pdfannotator'));