Commit graph

14 commits

Author SHA1 Message Date
Mark Nelson a26f0c2c66 Tidied up the PHPDocs and set the base element to an abstract class 2013-06-12 19:13:16 +08:00
Mark Nelson 7500bfda26 Changed the class names so that they match the directory structure 2013-06-12 16:23:08 +08:00
Mark Nelson fa5d45eef3 Completely refactored the code for editing a custom certificate
The elements for each page are listed in a table below the other page settings, meaning each page has a separate table for listing their elements. Each element is now edited in a pop-up, rather than having all the element settings displayed at once on the form causing it to look overcrowded. There is also no longer any need for the function add_element to add default values for the elements when they are added, as a a form is shown when you click to add an element where you can enter the values before it is created.

Note: I did not create a db/upgrade.php script to add the new database columns as this module should not be currently used by anyone.
2013-06-07 16:04:38 +08:00
Mark Nelson 59ea1afd75 Removed unnecessary second parameter for the render function 2013-06-06 11:14:06 +08:00
Mark Nelson 220d83935f Removed unnecessary subclass constructors 2013-06-06 11:14:06 +08:00
Mark Nelson 1d7c5b2c56 Updated the version and the Moodle version required to the 2.5 beta release 2013-04-12 17:33:23 +08:00
Mark Nelson 7c4e8def0c Altered the render function in the studentname element to use the common rendering function 2013-04-11 18:52:30 +08:00
Mark Nelson 86c82ea8da Renamed the function responsible for rendering the elements to something more suitable 2013-04-10 17:53:56 +08:00
Mark Nelson 8b3954cea7 Updated the code responsible for preventing internal access to certain files 2013-04-10 17:18:00 +08:00
Mark Nelson 2b4bbbe820 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.
2013-02-26 17:22:52 +08:00
Mark Nelson 52fbc108a7 Introduced a new form element for selecting a colour on the customcert customisation page 2013-02-25 22:52:15 +08:00
Mark Nelson 5945171a9d Changed how the elements are rendered when editing the customcert
Rather than using grouped elements which can span across multiple lines on a small screen, the elements are now generated within a header element, keeping them separated and making the form more manageable. The base class was also changed to accomodate this by making it easier for elements to utilise common features.
2013-02-22 17:39:46 +08:00
Mark Nelson b36c0b58dd Introduced the grade element 2013-02-22 16:15:32 +08:00
Mark Nelson 9d0eb727e5 Introduced customisable elements to the customcert
Elements are sub-plugins that have the same abilities as a core plugin, such as creating tables, capabilities and performing upgrades.

Currently elements can define -

* What additional form elements are rendered when adding the element to the customcert customisation page.
* How the data from the additional form elements is validated and saved.
* How the element is rendered on the PDF.
* How the element handles removing data when it is deleted.
2013-02-21 18:23:11 +08:00