This commit is contained in:
Andrew Nicols 2024-05-28 14:05:01 +08:00
commit 8639237c62
No known key found for this signature in database
GPG Key ID: 6D1E3157C8CFBF14
2 changed files with 2 additions and 2 deletions

View File

@ -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');

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();