Moved the rendering of the header form element for each customcert element to edit_form.php
The render_common_form_elements function was removed in the base class and it's contents put into the render_form_element function. These changes mean that some elements may not be required to override the render_form_element function, such as the studentname element, where this function was removed.
This commit is contained in:
parent
52fbc108a7
commit
2b4bbbe820
6 changed files with 7 additions and 37 deletions
|
@ -244,6 +244,9 @@ class mod_customcert_edit_form extends moodleform {
|
|||
// It's possible this element was added to the database then the folder was deleted, if
|
||||
// this is the case we do not want to render these elements as an error will occur.
|
||||
if (file_exists($classfile)) {
|
||||
// Add element header.
|
||||
$mform->addElement('header', 'headerelement_' . $element->id, get_string('page', 'customcert', $pagenum) . " - " .
|
||||
get_string('pluginname', 'customcertelement_' . $element->element));
|
||||
// Add the page number to the element so we can use within the element.
|
||||
$element->pagenum = $pagenum;
|
||||
// Get the classname.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue