MDL-67814 h5p: recover missed xAPI settings
[moodle.git] / report / loglive / classes / renderer_ajax.php
blob411fe16ed7da55ee895ef95dc4297481d4ffd971
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.
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 * Log live report ajax renderer.
19 * @package report_loglive
20 * @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
21 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 /**
25 * Log live report ajax renderer.
27 * @since Moodle 2.7
28 * @package report_loglive
29 * @copyright 2014 onwards Ankit Agarwal <ankit.agrr@gmail.com>
30 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
32 class report_loglive_renderer_ajax extends plugin_renderer_base {
34 /**
35 * This method should never be manually called, it should only be called by process.
36 * Please call the render method instead.
38 * @deprecated since 2.8, to be removed in 2.9
39 * @param report_loglive_renderable $reportloglive
40 * @return string
42 public function render_report_loglive_renderable(report_loglive_renderable $reportloglive) {
43 debugging('Do not call this method. Please call $renderer->render($reportloglive) instead.', DEBUG_DEVELOPER);
44 return $this->render($reportloglive);
47 /**
48 * Render logs for ajax.
50 * @param report_loglive_renderable $reportloglive object of report_loglive_renderable.
52 * @return string html to be displayed to user.
54 protected function render_report_loglive(report_loglive_renderable $reportloglive) {
55 if (empty($reportloglive->selectedlogreader)) {
56 return null;
58 $table = $reportloglive->get_table(true);
59 return $table->out($reportloglive->perpage, false);