| Server IP : 165.22.154.248 / Your IP : 216.73.217.111 [ Web Server : Apache/2.4.29 (Ubuntu) System : Linux droplet-integra 4.15.0-197-generic #208-Ubuntu SMP Tue Nov 1 17:23:37 UTC 2022 x86_64 User : www-data ( 33) PHP Version : 7.2.24-0ubuntu0.18.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/avanza-lms.old.bak9874115/blocks/ranking_didactic/classes/output/ |
Upload File : |
<?php
// Este codigo le pertenece a Escuela Didactica <https://escueladidactica.com>
//
// Construimos procesos de transformación para empresas donde sus
// colaboradores se capaciten con el conocimiento de su empresa
// mediante experiencias educativas digitales.
//
/**
*
* @package block_ranking_didactic
* @copyright 2019 Jose Gomez <info@escueladidactica.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace block_ranking_didactic\output;
defined('MOODLE_INTERNAL') || die();
use renderable;
use renderer_base;
use templatable;
require_once($CFG->dirroot . "/blocks/ranking_didactic/lib.php"); //Libreria de funciones usadas en export_for_template
/**
* Class containing data for my overview block.
*
* @copyright 2017 Simey Lameze <simey@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class view implements renderable, templatable {
/**
* @var string The tab to display.
*/
public $courseid;
/**
* Constructor.
*
* @param string $courseid The tab to display.
*/
public function __construct($courseid) {
$this->courseid = $courseid;
}
/**
* Export this data so it can be used as the context for a mustache template.
*
* @param \renderer_base $output
* @return stdClass
*/
public function export_for_template(renderer_base $output) {
global $CFG;
$data_ranking = get_ranking_users($this->courseid, 300);
$data_template = order_data_for_template($data_ranking);
$data = [
'data_ranking' => $data_template,
'wwwroot' => $CFG->wwwroot,
'courseid' => $this->courseid,
'txt_points' => get_string('txt_points', 'block_ranking_didactic'),
];
return $data;
}
}