aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-12-02 14:49:48 +0300
committerValentin Popov <info@valentineus.link>2017-12-02 14:49:48 +0300
commitf29871f1744f60edd6770da6db83aad756c161af (patch)
treef6b1830b9c8554601d9594f4bb3e4f7c307ee986
parent267dab04842a74cf2107a6391ef9d62ea64e4caf (diff)
downloadtool_managertokens-f29871f1744f60edd6770da6db83aad756c161af.tar.xz
tool_managertokens-f29871f1744f60edd6770da6db83aad756c161af.zip
Correction of transmitted types
-rw-r--r--classes/standard_forms.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/classes/standard_forms.php b/classes/standard_forms.php
index 0ab66d7..2b863a6 100644
--- a/classes/standard_forms.php
+++ b/classes/standard_forms.php
@@ -66,7 +66,7 @@ class token_editor_form extends moodleform {
$mform->addElement("text", "token", new lang_string("password", "moodle"));
$mform->addRule("token", null, "required");
$mform->setDefault("token", generate_password(12));
- $mform->setType("token", PARAM_NOTAGS);
+ $mform->setType("token", PARAM_RAW_TRIMMED);
/* State switching element */
$mform->addElement("advcheckbox", "enabled", new lang_string("enable", "moodle"));
@@ -83,8 +83,7 @@ class token_editor_form extends moodleform {
/* The identifier element */
$mform->addElement("text", "targetid", new lang_string("idnumbermod", "moodle"));
$mform->addRule("targetid", null, "required");
- $mform->setDefault("targetid", 1);
- $mform->setType("targetid", PARAM_INT);
+ $mform->setType("targetid", PARAM_RAW_TRIMMED);
/* The header of constraints */
$mform->addElement("header", "statsuserlogins", new lang_string("statsuserlogins", "moodle"));