Introduced functionality to save and load customcert templates
Note: I did not create a db/upgrade.php script to add the new database tables as this module should not be currently used by anyone.
This commit is contained in:
parent
bc621a85e3
commit
d7174ce3c8
11 changed files with 512 additions and 41 deletions
|
@ -135,7 +135,7 @@ class customcert_element_base {
|
|||
$mform->addHelpButton('colour_' . $id, 'fontcolour', 'customcert');
|
||||
$mform->addHelpButton('posx_' . $id, 'posx', 'customcert');
|
||||
$mform->addHelpButton('posy_' . $id, 'posy', 'customcert');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs validation on the element values.
|
||||
|
@ -221,6 +221,28 @@ class customcert_element_base {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* This will handle how individual elements save their data
|
||||
* to a template to be loaded later.
|
||||
* Can be overridden if more functionality is needed.
|
||||
*
|
||||
* @param stdClass $data the form data.
|
||||
*/
|
||||
public function save_data_to_template($data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* This will handle how individual elements load their data
|
||||
* from a template to an existing customcert.
|
||||
* Can be overridden if more functionality is needed.
|
||||
*
|
||||
* @param stdClass $data the form data.
|
||||
*/
|
||||
public function load_data_from_template($data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles rendering the element on the pdf.
|
||||
* Must be overridden.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue