diff --git a/classes/edit_form.php b/classes/edit_form.php index 61e4e95..064ead5 100644 --- a/classes/edit_form.php +++ b/classes/edit_form.php @@ -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'); diff --git a/edit.php b/edit.php index 6185991..1941143 100644 --- a/edit.php +++ b/edit.php @@ -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); }