From f29871f1744f60edd6770da6db83aad756c161af Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Sat, 2 Dec 2017 15:49:48 +0400 Subject: Correction of transmitted types --- classes/standard_forms.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'classes') 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")); -- cgit v1.2.3