first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-09-30 18:11:26 -04:00
commit e592ca6823
27270 changed files with 5002257 additions and 0 deletions
@@ -0,0 +1,124 @@
<?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/>.
/**
* Form for creating/updating a custom license.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tom.dickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_licensemanager\form;
use moodleform;
use tool_licensemanager\helper;
use tool_licensemanager\manager;
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
global $CFG;
require_once($CFG->libdir . '/formslib.php');
/**
* Form for creating/updating a custom license.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tom.dickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class edit_license extends moodleform {
/**
* @var string the action form is taking.
*/
private $action;
/**
* @var string license shortname if editing or empty string if creating license.
*/
private $licenseshortname;
/**
* edit_license constructor.
*
* @param string $action the license_manager action to be taken by form.
* @param string $licenseshortname the shortname of the license to edit.
*/
public function __construct(string $action, string $licenseshortname) {
$this->action = $action;
$this->licenseshortname = $licenseshortname;
if ($action == manager::ACTION_UPDATE && !empty($licenseshortname)) {
parent::__construct(helper::get_update_license_url($licenseshortname));
} else {
parent::__construct(helper::get_create_license_url());
}
}
/**
* Form definition for creation and editing of licenses.
*/
public function definition() {
$mform = $this->_form;
$mform->addElement('text', 'shortname', get_string('shortname', 'tool_licensemanager'));
$mform->setType('shortname', PARAM_NOTAGS);
// Shortname is only editable when user is creating a license.
if ($this->action != manager::ACTION_CREATE) {
$mform->freeze('shortname');
} else {
$mform->addRule('shortname', get_string('shortnamerequirederror', 'tool_licensemanager'), 'required');
}
$mform->addElement('text', 'fullname', get_string('fullname', 'tool_licensemanager'));
$mform->setType('fullname', PARAM_TEXT);
$mform->addRule('fullname', get_string('fullnamerequirederror', 'tool_licensemanager'), 'required');
$mform->addElement('text', 'source', get_string('source', 'tool_licensemanager'));
$mform->setType('source', PARAM_URL);
$mform->addHelpButton('source', 'source', 'tool_licensemanager');
$mform->addRule('source', get_string('sourcerequirederror', 'tool_licensemanager'), 'required');
$mform->addElement('date_selector', 'version', get_string('version', 'tool_licensemanager'));
$mform->addHelpButton('version', 'version', 'tool_licensemanager');
$this->add_action_buttons();
}
/**
* Validate form data and return errors (if any).
*
* @param array $data array of ("fieldname"=>value) of submitted data
* @param array $files array of uploaded files "element_name"=>tmp_file_path
* @return array of "element_name"=>"error_description" if there are errors,
* or an empty array if everything is OK (true allowed for backwards compatibility too).
*/
public function validation($data, $files) {
$errors = parent::validation($data, $files);
if (array_key_exists('source', $data) && !filter_var($data['source'], FILTER_VALIDATE_URL)) {
$errors['source'] = get_string('invalidurl', 'tool_licensemanager');
}
if (array_key_exists('version', $data) && $data['version'] > time()) {
$errors['version'] = get_string('versioncannotbefuture', 'tool_licensemanager');
}
return $errors;
}
}
@@ -0,0 +1,139 @@
<?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/>.
namespace tool_licensemanager;
use moodle_url;
/**
* License manager helper class.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class helper {
/**
* Moodle relative path to the licenses manager.
*/
const MANAGER_PATH = '/admin/tool/licensemanager/index.php';
/**
* Get the URL for viewing the license manager interface.
*
* @return \moodle_url
*/
public static function get_licensemanager_url(): moodle_url {
return new moodle_url(self::MANAGER_PATH);
}
/**
* Get the URL for endpoint enabling a license.
*
* @param string $licenseshortname the shortname of license to enable.
*
* @return \moodle_url
*/
public static function get_enable_license_url(string $licenseshortname): moodle_url {
$url = new moodle_url(self::MANAGER_PATH,
['action' => manager::ACTION_ENABLE, 'license' => $licenseshortname, 'sesskey' => sesskey()]);
return $url;
}
/**
* Get the URL for endpoint disabling a license.
*
* @param string $licenseshortname the shortname of license to disable.
*
* @return \moodle_url
*/
public static function get_disable_license_url(string $licenseshortname): moodle_url {
$url = new moodle_url(self::MANAGER_PATH,
['action' => manager::ACTION_DISABLE, 'license' => $licenseshortname, 'sesskey' => sesskey()]);
return $url;
}
/**
* Get the URL endpoint to create a new license.
*
* @return \moodle_url
*/
public static function get_create_license_url(): moodle_url {
$url = self::get_licensemanager_url();
$url->params(['action' => manager::ACTION_CREATE]);
return $url;
}
/**
* Get the URL endpoint to update an existing license.
*
* @param string $licenseshortname the shortname of license to update.
*
* @return \moodle_url
*/
public static function get_update_license_url(string $licenseshortname): moodle_url {
$url = self::get_licensemanager_url();
$url->params(['action' => manager::ACTION_UPDATE, 'license' => $licenseshortname]);
return $url;
}
/**
* Get the URL endpoint to move a license up order.
*
* @param string $licenseshortname the shortname of license to move up.
*
* @return \moodle_url
*/
public static function get_moveup_license_url(string $licenseshortname): moodle_url {
$url = new moodle_url(self::MANAGER_PATH,
['action' => manager::ACTION_MOVE_UP, 'license' => $licenseshortname, 'sesskey' => sesskey()]);
return $url;
}
/**
* Get the URL endpoint to move a license down order.
*
* @param string $licenseshortname the shortname of license to move down.
*
* @return \moodle_url
*/
public static function get_movedown_license_url(string $licenseshortname): moodle_url {
$url = new moodle_url(self::MANAGER_PATH,
['action' => manager::ACTION_MOVE_DOWN, 'license' => $licenseshortname, 'sesskey' => sesskey()]);
return $url;
}
/**
* Convert a license version number string to a UNIX epoch.
*
* @param string $version
*
* @return int $epoch
*/
public static function convert_version_to_epoch(string $version): int {
$date = substr($version, 0, 8);
$epoch = strtotime($date);
return $epoch;
}
}
@@ -0,0 +1,253 @@
<?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/>.
namespace tool_licensemanager;
use tool_licensemanager\form\edit_license;
use license_manager;
use stdClass;
/**
* License manager, main controller for tool_licensemanager.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class manager {
/**
* Action for creating a new custom license.
*/
const ACTION_CREATE = 'create';
/**
* Action for updating a custom license's details.
*/
const ACTION_UPDATE = 'update';
/**
* Action for deleting a custom license.
*/
const ACTION_DELETE = 'delete';
/**
* Action for disabling a custom license.
*/
const ACTION_DISABLE = 'disable';
/**
* Action for enabling a custom license.
*/
const ACTION_ENABLE = 'enable';
/**
* Action for displaying the license list view.
*/
const ACTION_VIEW_LICENSE_MANAGER = 'viewlicensemanager';
/**
* Action for moving a license up order.
*/
const ACTION_MOVE_UP = 'moveup';
/**
* Action for moving a license down order.
*/
const ACTION_MOVE_DOWN = 'movedown';
/**
* Entry point for internal license manager.
*
* @param string $action the api action to carry out.
* @param string|object $license the license object or shortname of license to carry action out on.
*/
public function execute(string $action, $license): void {
admin_externalpage_setup('licensemanager');
// Convert license to a string if it's a full license object.
if (is_object($license)) {
$license = $license->shortname;
}
$viewmanager = true;
$message = null;
$redirect = helper::get_licensemanager_url();
switch ($action) {
case self::ACTION_DISABLE:
require_sesskey();
license_manager::disable($license);
redirect($redirect);
break;
case self::ACTION_ENABLE:
require_sesskey();
license_manager::enable($license);
redirect($redirect);
break;
case self::ACTION_DELETE:
require_sesskey();
try {
license_manager::delete($license);
} catch (\moodle_exception $e) {
$message = $e->getMessage();
}
redirect($redirect, $message);
break;
case self::ACTION_CREATE:
case self::ACTION_UPDATE:
$viewmanager = $this->edit($action, $license);
break;
case self::ACTION_MOVE_UP:
case self::ACTION_MOVE_DOWN:
require_sesskey();
$this->change_license_order($action, $license);
redirect($redirect);
break;
case self::ACTION_VIEW_LICENSE_MANAGER:
default:
break;
}
if ($viewmanager) {
$this->view_license_manager($message);
}
}
/**
* Edit an existing license or create a new license.
*
* @param string $action the form action to carry out.
* @param string $licenseshortname the shortname of the license to edit.
*
* @return bool true if license editing complete, false otherwise.
*/
private function edit(string $action, string $licenseshortname): bool {
if ($action != self::ACTION_CREATE && $action != self::ACTION_UPDATE) {
throw new \coding_exception('license edit actions are limited to create and update');
}
$form = new form\edit_license($action, $licenseshortname);
if ($form->is_cancelled()) {
return true;
} else if ($data = $form->get_data()) {
$license = new stdClass();
if ($action == self::ACTION_CREATE) {
// Check that license shortname isn't already in use.
if (!empty(license_manager::get_license_by_shortname($data->shortname))) {
throw new \moodle_exception('duplicatelicenseshortname', 'tool_licensemanager',
helper::get_licensemanager_url(),
$data->shortname);
}
$license->shortname = $data->shortname;
} else {
if (empty(license_manager::get_license_by_shortname($licenseshortname))) {
throw new \moodle_exception('licensenotfoundshortname', 'license',
helper::get_licensemanager_url(),
$licenseshortname);
}
$license->shortname = $licenseshortname;
}
$license->fullname = $data->fullname;
$license->source = $data->source;
// Legacy date format maintained to prevent breaking on upgrade.
$license->version = date('Ymd', $data->version) . '00';
license_manager::save($license);
return true;
} else {
$this->view_license_editor($action, $licenseshortname, $form);
return false;
}
}
/**
* Change license order by moving up or down license order.
*
* @param string $direction which direction to move, up or down.
* @param string $licenseshortname the shortname of the license to move up or down order.
*/
private function change_license_order(string $direction, string $licenseshortname): void {
if (!empty($licenseshortname)) {
if ($direction == self::ACTION_MOVE_UP) {
license_manager::change_license_sortorder(license_manager::LICENSE_MOVE_UP, $licenseshortname);
} else if ($direction == self::ACTION_MOVE_DOWN) {
license_manager::change_license_sortorder(license_manager::LICENSE_MOVE_DOWN, $licenseshortname);
}
}
}
/**
* View the license editor to create or edit a license.
*
* @param string $action
* @param string $licenseshortname the shortname of the license to create/edit.
* @param \tool_licensemanager\form\edit_license $form the form for submitting edit data.
*/
private function view_license_editor(string $action, string $licenseshortname, edit_license $form): void {
global $PAGE;
$renderer = $PAGE->get_renderer('tool_licensemanager');
if ($action == self::ACTION_UPDATE && $license = license_manager::get_license_by_shortname($licenseshortname)) {
$return = $renderer->render_edit_licence_headers($licenseshortname);
$form->set_data(['shortname' => $license->shortname]);
$form->set_data(['fullname' => $license->fullname]);
$form->set_data(['source' => $license->source]);
$form->set_data(['version' => helper::convert_version_to_epoch($license->version)]);
} else {
$return = $renderer->render_create_licence_headers();
}
$return .= $form->render();
$return .= $renderer->footer();
echo $return;
}
/**
* View the license manager.
*/
private function view_license_manager(string $message = null): void {
global $PAGE, $OUTPUT;
$renderer = $PAGE->get_renderer('tool_licensemanager');
$html = $renderer->header();
$html .= $renderer->heading(get_string('licensemanager', 'tool_licensemanager'));
if (!empty($message)) {
$html .= $OUTPUT->notification($message);
}
$table = new \tool_licensemanager\output\table();
$html .= $renderer->render($table);
$html .= $renderer->footer();
echo $html;
}
}
@@ -0,0 +1,96 @@
<?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/>.
/**
* Renderer for 'tool_licensemanager' component.
*
* @package tool_licensemanager
* @copyright Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_licensemanager\output;
defined('MOODLE_INTERNAL') || die();
use license_manager;
use plugin_renderer_base;
use tool_licensemanager\helper;
/**
* Renderer class for 'tool_licensemanager' component.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class renderer extends plugin_renderer_base {
/**
* Render the headers for create license form.
*
* @return string html fragment for display.
*/
public function render_create_licence_headers(): string {
$this->page->navbar->add(get_string('createlicense', 'tool_licensemanager'),
helper::get_create_license_url());
$return = $this->header();
$return .= $this->heading(get_string('createlicense', 'tool_licensemanager'));
return $return;
}
/**
* Render the headers for edit license form.
*
* @param string $licenseshortname the shortname of license to edit.
*
* @return string html fragment for display.
*/
public function render_edit_licence_headers(string $licenseshortname): string {
$this->page->navbar->add(get_string('editlicense', 'tool_licensemanager'),
helper::get_update_license_url($licenseshortname));
$return = $this->header();
$return .= $this->heading(get_string('editlicense', 'tool_licensemanager'));
return $return;
}
/**
* Render the license manager table.
*
* @param \renderable $table the renderable.
*
* @return string HTML.
*/
public function render_table(\renderable $table) {
$licenses = license_manager::get_licenses();
// Add the create license button.
$html = $table->create_license_link();
// Add the table containing licenses for management.
$html .= $this->box_start('generalbox editorsui');
$html .= $table->create_license_manager_table($licenses, $this);
$html .= $this->box_end();
return $html;
}
}
@@ -0,0 +1,196 @@
<?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/>.
/**
* Renderable for display of license manager table.
*
* @package tool_licensemanager
* @copyright 2020 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_licensemanager\output;
use html_table;
use html_table_cell;
use html_table_row;
use html_writer;
use license_manager;
defined('MOODLE_INTERNAL') || die();
/**
* Renderable for display of license manager table.
*
* @package tool_licensemanager
* @copyright 2020 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class table implements \renderable {
/**
* 'Create License' link.
*
* @return string HTML string.
*/
public function create_license_link() {
$link = html_writer::link(\tool_licensemanager\helper::get_create_license_url(),
get_string('createlicensebuttontext', 'tool_licensemanager'),
['class' => 'btn btn-secondary mb-3']);
return $link;
}
/**
* Create the HTML table for license management.
*
* @param array $licenses
* @param \renderer_base $output
*
* @return string HTML for license manager table.
*/
public function create_license_manager_table(array $licenses, \renderer_base $output) {
$table = new html_table();
$table->head = [
get_string('enable'),
get_string('license', 'tool_licensemanager'),
get_string('version'),
get_string('order'),
get_string('edit'),
get_string('delete'),
];
$table->colclasses = [
'text-center',
'text-left',
'text-left',
'text-center',
'text-center',
'text-center',
];
$table->id = 'manage-licenses';
$table->attributes['class'] = 'admintable generaltable';
$table->data = [];
$rownumber = 0;
$rowcount = count($licenses);
foreach ($licenses as $key => $value) {
$canmoveup = $rownumber > 0;
$canmovedown = $rownumber < $rowcount - 1;
$table->data[] = $this->get_license_table_row_data($value, $canmoveup, $canmovedown, $output);
$rownumber++;
}
$html = html_writer::table($table);
return $html;
}
/**
* Get table row data for a license.
*
* @param object $license the license to populate row data for.
* @param bool $canmoveup can this row move up.
* @param bool $canmovedown can this row move down.
* @param \renderer_base $output the renderer
*
* @return \html_table_row of columns values for row.
*/
protected function get_license_table_row_data($license, bool $canmoveup, bool $canmovedown, \renderer_base $output) {
global $CFG;
$summary = $license->fullname . ' ('. $license->shortname . ')';
if (!empty($license->source)) {
$summary .= html_writer::empty_tag('br');
$summary .= html_writer::link($license->source, $license->source, ['target' => '_blank']);
}
$summarycell = new html_table_cell($summary);
$summarycell->attributes['class'] = 'license-summary';
$versioncell = new html_table_cell($license->version);
$versioncell->attributes['class'] = 'license-version';
$deletelicense = '';
if ($license->shortname == $CFG->sitedefaultlicense) {
$hideshow = $output->pix_icon('t/locked', get_string('sitedefaultlicenselock', 'tool_licensemanager'));
} else {
if ($license->enabled == license_manager::LICENSE_ENABLED) {
$hideshow = html_writer::link(\tool_licensemanager\helper::get_disable_license_url($license->shortname),
$output->pix_icon('t/hide', get_string('disablelicensename', 'tool_licensemanager', $license->fullname)));
} else {
$hideshow = html_writer::link(\tool_licensemanager\helper::get_enable_license_url($license->shortname),
$output->pix_icon('t/show', get_string('enablelicensename', 'tool_licensemanager', $license->fullname)));
}
if ($license->custom == license_manager::CUSTOM_LICENSE) {
$deletelink = new \moodle_url('/admin/tool/licensemanager/index.php', [
'action' => 'delete',
'license' => $license->shortname,
'sesskey' => sesskey(),
]);
$deletelicense = html_writer::link(
url: '#',
text: $output->pix_icon('i/trash', get_string('deletelicensename', 'tool_licensemanager', $license->fullname)),
attributes: [
'class' => 'delete-license',
'data-modal' => 'confirmation',
'data-modal-title-str' => json_encode(['deletelicense', 'tool_licensemanager']),
'data-modal-content-str' => json_encode(['deletelicenseconfirmmessage', 'tool_licensemanager']),
'data-modal-destination' => $deletelink->out(false),
],
);
}
}
$hideshowcell = new html_table_cell($hideshow);
$hideshowcell->attributes['class'] = 'license-status';
if ($license->custom == license_manager::CUSTOM_LICENSE) {
$editlicense = html_writer::link(\tool_licensemanager\helper::get_update_license_url($license->shortname),
$output->pix_icon('t/editinline', get_string('editlicensename', 'tool_licensemanager', $license->fullname)),
['class' => 'edit-license']);
} else {
$editlicense = '';
}
$editlicensecell = new html_table_cell($editlicense);
$editlicensecell->attributes['class'] = 'edit-license';
$spacer = $output->pix_icon('spacer', '', 'moodle', ['class' => 'iconsmall']);
$updown = '';
if ($canmoveup) {
$updown .= html_writer::link(\tool_licensemanager\helper::get_moveup_license_url($license->shortname),
$output->pix_icon('t/up', get_string('movelicenseupname', 'tool_licensemanager', $license->fullname),
'moodle', ['class' => 'iconsmall']),
['class' => 'move-up']) . '';
} else {
$updown .= $spacer;
}
if ($canmovedown) {
$updown .= '&nbsp;'.html_writer::link(\tool_licensemanager\helper::get_movedown_license_url($license->shortname),
$output->pix_icon('t/down', get_string('movelicensedownname', 'tool_licensemanager', $license->fullname),
'moodle', ['class' => 'iconsmall']),
['class' => 'move-down']);
} else {
$updown .= $spacer;
}
$updowncell = new html_table_cell($updown);
$updowncell->attributes['class'] = 'license-order';
$row = new html_table_row([$hideshowcell, $summarycell, $versioncell, $updowncell, $editlicensecell, $deletelicense]);
$row->attributes['data-license'] = $license->shortname;
$row->attributes['class'] = strtolower(get_string('license', 'tool_licensemanager'));
return $row;
}
}
@@ -0,0 +1,47 @@
<?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/>.
/**
* Privacy Subsystem implementation for tool_licensemanager implementing null_provider.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
namespace tool_licensemanager\privacy;
defined('MOODLE_INTERNAL') || die();
/**
* Privacy Subsystem implementation for tool_licensemanager implementing null_provider.
*
* @package tool_licensemanager
* @copyright 2019 Tom Dickman <tomdickman@catalyst-au.net>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class provider implements \core_privacy\local\metadata\null_provider {
/**
* Get the language string identifier with the component's language
* file to explain why this plugin stores no data.
*
* @return string
*/
public static function get_reason(): string {
return 'privacy:metadata';
}
}