Added a token generator

This commit is contained in:
Valentin Popov 2017-12-01 15:43:26 +04:00
parent a80643aeff
commit afd218e1fd

View File

@ -65,6 +65,7 @@ class token_editor_form extends moodleform {
/* Entry element of the token */
$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);
/* State switching element */