Commit graph

10 commits

Author SHA1 Message Date
Mark Nelson
c1a70c763e #203 Consistency among headings/titles on all pages 2018-06-26 19:28:34 +08:00
Mark Nelson
fedfe95080 Created factory class 2017-08-26 13:35:43 +08:00
Mark Nelson
43d20c0d1b Huge refactor
1) Every certificate is a template. Before a user would create a certificate then had
the option to save it as a template. This could potentially be chaotic with numerous
users creating templates, making the template system a mess. Now, rather than creating
a certificate first, then saving it as a template, you are always creating a template.
Each template is associated with a context, so depending on where you are creating it
the context is different. This means users in the CONTEXT_MODULE context are creating
a template specific to that module, where as a user creating a template in the
CONTEXT_SYSTEM context would be creating a general template that can be used by others.
This meant we can remove the 'customcert_template_*' db tables. Yay - no duplicated
tables.
2) Created new helper classes and moved functionality there.
3) Moved files to classes/ for autoloading.
4) General tidy up.
2016-02-20 16:35:19 +08:00
Mark Nelson
2416e8a3e0 Introduced automatic class loading for elements 2015-12-15 13:15:17 +08:00
Mark Nelson
74003bf0bb Moved file manager to the image element 2015-03-13 23:37:07 -07:00
Mark Nelson
73cf11b043 Only call definition_after_data when we are editing an element so that we know data exists 2013-07-25 13:08:16 +08:00
Mark Nelson
3dd19d8390 Removed the pop-up when editing an element to conform to Moodle standards 2013-07-25 13:08:16 +08:00
Mark Nelson
5203d81980 Changed PHPDocs and added date to the copyright to match Moodle coding guidelines 2013-07-22 13:06:18 +08:00
Mark Nelson
96e1d93024 Renamed the element directory name to a singular to conform to Moodle standards 2013-06-21 17:35:14 +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