2 // This file is part of Moodle - http://moodle.org/
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.
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/>.
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
25 * Log live report ajax renderer.
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
{
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
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);
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
)) {
58 $table = $reportloglive->get_table(true);
59 return $table->out($reportloglive->perpage
, false);