Change back to using text area for html

This commit is contained in:
Kumi 2021-11-24 09:20:10 +01:00
parent 4459df050e
commit 0a635d65ad
2 changed files with 2 additions and 2 deletions

View file

@ -54,7 +54,7 @@ class edit_form extends \moodleform {
$mform->setType('name', PARAM_TEXT);
$mform->addRule('name', null, 'required');
$mform->addElement('editor', 'html', get_string('html', 'htmlcert'));
$mform->addElement('textarea', 'html', get_string('html', 'htmlcert'));
$mform->setType('html', PARAM_RAW);
$mform->addRule('html', null, 'required');

View file

@ -81,7 +81,7 @@ if ($context->contextlevel == CONTEXT_SYSTEM) {
if ($tid) {
$mform = new \mod_htmlcert\edit_form($pageurl, array('tid' => $tid));
// Set the name for the form.
$mform->set_data(array('name' => $template->get_name()));
$mform->set_data(array('name' => $template->get_name(), 'html' => $template->get_html()));
} else {
$mform = new \mod_htmlcert\edit_form($pageurl);
}