Commit graph

86 commits

Author SHA1 Message Date
Mark Nelson 70b47d6de3 Added module help and link 2016-06-14 20:28:39 +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 355de679e8 Added a 'leftmargin' field
Also renamed the 'margin' field to 'rightmargin'
to easily distinguish between the two.
2015-12-11 12:10:45 +08:00
Mark Nelson 3a63a6e00a Minor changes 2015-12-10 11:40:25 +08:00
Mark Nelson e441b7051b Removed the 'align' property 2015-12-08 18:27:30 +08:00
Mark Nelson 87d1ecfcc7 Removed the 'Download grid' functionality 2015-12-06 16:54:19 +08:00
Mark Nelson 4efbac65ff Fixed typo 2015-08-09 17:48:55 -07:00
Shamim Rezaie 9998fa2b4a Added drag & drop feature to rearrange elements 2015-08-05 14:19:55 -05:00
Shamim Rezaie 039e8bca37 Implemented support for element alignment
Also specifying the reference point location (the
location of the element that's put at posx and
posy) for each element.
2015-08-05 14:19:54 -05:00
Shamim Rezaie 6400e587d8 Added support for having right margin and width limit for each element
In addition to width and height, each page can have an
optional (right) margin attribute. Also, each element
can have an optional width attribute.
2015-08-05 14:16:56 -05:00
Shamim Rezaie 3774a6323c Added ability to modify templates and save them with same name.
An option named "replace" has been added to the same
template form so user can choose to overwrite an existing
template (i.e. modify and save an existing template).
2015-08-05 12:23:51 -05:00
Mark Nelson 91cc331a89 Added index.php file
This file is barely accessed in Moodle, if it all. However, it is
required in order to upload this module to the plugin database as
it is needed to pass validation.
2013-09-09 18:40:32 +08:00
Mark Nelson 4b2692d377 Images can now be saved into either the course or system context 2013-09-09 17:10:37 +08:00
Mark Nelson 9b77e2734e Specified and corrected units of measurement in the language strings 2013-07-26 14:43:34 +08:00
Mark Nelson 8b92d1c307 Removed the orientation field as it is redundant considering the width and height are already specified
Note: I did not create a db/upgrade.php script to remove the database column as this module should not be currently used by anyone.
2013-07-25 18:54:28 +08:00
Mark Nelson 23d611de1b Added ability to print out a grid PDF so that the user knows where to specify the placement of elements 2013-07-25 18:36:43 +08:00
Mark Nelson cf0bdf7580 Placed long language strings on to two lines 2013-07-25 13:08:17 +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 1527587218 Changed the string 'configure' to 'edit' to conform to Moodle standards 2013-06-21 14:02:49 +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 0dc1ef19c9 Introduced an image element and refactored the code in the process so less code was required in the new element 2013-05-30 17:55:40 +08:00
Mark Nelson 8350c4afbf Introduced basic reporting functionality 2013-05-22 19:37:39 +08:00
Mark Nelson a513ba8038 Added functionality to preview the custom certificate 2013-05-17 11:09:22 +08:00
Mark Nelson c0d081f849 Added the ability to specify the PDF protection
Note: I did not create a db/upgrade.php script to add the new database column as this module should not be currently used by anyone.
2013-05-16 13:21:12 +08:00
Mark Nelson d7174ce3c8 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.
2013-05-16 13:17:34 +08:00
Mark Nelson 9e36732d5f Updated package and removed subpackage from PHPDocs 2013-04-26 15:39:59 +08:00
Mark Nelson f2314ad49e Updated the validation of the width and height for the customcert page 2013-04-24 18:10:52 +08:00
Mark Nelson 6b145ee81f Renamed the label for the customcert intro field 2013-04-24 15:44:13 +08:00
Mark Nelson dcdfeb9956 Changed the validation of the colour picker to only allow HTML colours or hexadecimal values
The reason for this is because the call to TCPDF_COLORS::convertHTMLColorToDec only allows these values.
2013-04-11 19:30:48 +08:00
Mark Nelson 31168708bb Added a view.php file 2013-04-09 17:31:36 +08:00
Mark Nelson cd2564163a Moved and renamed the delete element submit button 2013-04-09 15:49:29 +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
Mark Nelson 2b8403438f Module will install successfully with limited functionality
The module will add tables to the DB on install, you can then add/edit instances and add/edit pages to these instances.
2013-02-18 11:48:16 +08:00