MDL-45184 tool_licenses: Add custom licenses
authorTom Dickman <tomdickman@catalyst-au.net>
Thu, 31 Oct 2019 01:32:17 +0000 (12:32 +1100)
committerTom Dickman <tomdickman@catalyst-au.net>
Tue, 26 May 2020 02:08:05 +0000 (12:08 +1000)
commit4399e4759a07d2f38e8519860dcf3eb337275643
tree17a73a6eec77ce8909b973c13359485e6a1414fa
parent71965a857221c98264cc7fbe360b9ebb860a5dee
MDL-45184 tool_licenses: Add custom licenses

This feature adds an admin tool for creating custom licenses.
Now custom licenses can be added and amended in Moodle, and the site
default can be set to a custom license.

Core licenses remain hard-coded and are uneditable, so they will always
require update within Moodle core updates, and maintain their
internationalisation through core language strings.

This also includes fundamental changes to the license API including
the addition of license caching and deprecation of no longer required
admin settings for license management.
39 files changed:
admin/settings/license.php [new file with mode: 0644]
admin/settings/plugins.php
admin/settings/top.php
admin/tool/licensemanager/amd/build/delete_license.min.js [new file with mode: 0644]
admin/tool/licensemanager/amd/build/delete_license.min.js.map [new file with mode: 0644]
admin/tool/licensemanager/amd/src/delete_license.js [new file with mode: 0644]
admin/tool/licensemanager/classes/form/edit_license.php [new file with mode: 0644]
admin/tool/licensemanager/classes/helper.php [new file with mode: 0644]
admin/tool/licensemanager/classes/manager.php [new file with mode: 0644]
admin/tool/licensemanager/classes/output/renderer.php [new file with mode: 0644]
admin/tool/licensemanager/classes/output/table.php [new file with mode: 0644]
admin/tool/licensemanager/classes/privacy/provider.php [new file with mode: 0644]
admin/tool/licensemanager/index.php [moved from admin/licenses.php with 55% similarity]
admin/tool/licensemanager/lang/en/tool_licensemanager.php [new file with mode: 0644]
admin/tool/licensemanager/settings.php [new file with mode: 0644]
admin/tool/licensemanager/tests/behat/delete_license.feature [new file with mode: 0644]
admin/tool/licensemanager/tests/behat/edit_license.feature [new file with mode: 0644]
admin/tool/licensemanager/tests/behat/license_manager.feature [new file with mode: 0644]
admin/tool/licensemanager/tests/helper_test.php [new file with mode: 0644]
admin/tool/licensemanager/tests/manager_test.php [new file with mode: 0644]
admin/tool/licensemanager/version.php [new file with mode: 0644]
lang/en/admin.php
lang/en/cache.php
lang/en/deprecated.txt
lang/en/license.php
lib/adminlib.php
lib/classes/plugin_manager.php
lib/db/caches.php
lib/db/install.xml
lib/db/upgrade.php
lib/db/upgradelib.php
lib/form/filemanager.js
lib/form/filemanager.php
lib/licenselib.php
lib/tests/licenselib_test.php [new file with mode: 0644]
lib/tests/upgradelib_test.php
repository/filepicker.js
repository/lib.php
version.php