コード例 #1
0
ファイル: report.php プロジェクト: rafaelpiresck/scripts
 /**
  * Data post processing, this is useful to alter a table
  * content before it is printed on the screen, it should
  * not be changed here, it will call datamap class.
  */
 private function post_process()
 {
     $this->data = datamap::post_process($this->data);
     $this->columns = functions::get_columns((array) next($this->data));
 }
コード例 #2
0
ファイル: index.php プロジェクト: rafaelpiresck/scripts
<?php

/* Require mandatory scripts */
require_once dirname(dirname(dirname(__FILE__))) . '/config.php';
/* Generic optional parameters */
$id = optional_param('id', 0, PARAM_INT);
$export = optional_param('export', 0, PARAM_INT);
$page = optional_param('page', 0, PARAM_INT);
$sortby = optional_param('sortby', 0, PARAM_RAW);
$sortdir = optional_param('sortdir', 0, PARAM_RAW);
/* Mandatory variables */
$actionurl = new moodle_url('/report/cleanreport/index.php');
$pluginname = 'report_cleanreport';
$context = context_system::instance();
$pageparameters = \report_cleanreport\helpers\functions::page_parameters();
/* Global page parameters */
$PAGE->set_context($context);
$PAGE->set_url($actionurl);
$PAGE->set_pagelayout('report');
$PAGE->set_title(get_string('pluginname', $pluginname));
$PAGE->set_heading(get_string('pluginname', $pluginname));
$PAGE->navbar->ignore_active();
$PAGE->navbar->add(get_string('reports'));
$PAGE->navbar->add(get_string('pluginname', $pluginname));
/* Check permissions */
require_login();
require_capability('report/cleanreport:view', context_system::instance());
/* Process report */
$report = new \report_cleanreport\src\report();
$report->set_page($page);
$report->set_limit($CFG->cleanreport_limit);