MDL-81822 tool_licensemanager: slightly relax license shortname type.

The "*-4.0" license versions could not be managed currently.
This commit is contained in:
Paul Holden
2024-05-20 17:44:47 +01:00
parent bcae2164ac
commit a76a1e3f5c
2 changed files with 2 additions and 2 deletions
@@ -77,7 +77,7 @@ class edit_license extends moodleform {
$mform = $this->_form;
$mform->addElement('text', 'shortname', get_string('shortname', 'tool_licensemanager'));
$mform->setType('shortname', PARAM_ALPHANUMEXT);
$mform->setType('shortname', PARAM_NOTAGS);
// Shortname is only editable when user is creating a license.
if ($this->action != manager::ACTION_CREATE) {
$mform->freeze('shortname');
+1 -1
View File
@@ -29,7 +29,7 @@ require_once($CFG->libdir . '/licenselib.php');
require_admin();
$action = optional_param('action', '', PARAM_ALPHANUMEXT);
$license = optional_param('license', '', PARAM_SAFEDIR);
$license = optional_param('license', '', PARAM_NOTAGS);
// Route via the manager.
$licensemanager = new \tool_licensemanager\manager();