Commit graph

37 commits

Author SHA1 Message Date
967571cd14 Replaced plugin name and some logic 2021-11-24 08:29:43 +01:00
Mark Nelson
86551f18c7 #203 Consistency among headings/titles on all pages 2018-06-26 19:25:16 +08:00
Mark Nelson
3461c9585d #134 Do not load templates in site templates 2017-09-03 17:38:13 +08:00
Mark Nelson
2d1bc8a70c Added missing confirm_sesskey() checks 2017-09-02 14:28:02 +08:00
Mark Nelson
fa69bcc604 #129 Added Behat test coverage 2017-08-11 14:30:33 +08:00
Mark Nelson
44b3a77a5f Redirect after page deletion to avoid page error when refreshing 2017-08-08 11:04:19 +08:00
Mark Nelson
971a3fdbfe #35 Reworded 'addcertpage' string and changed button to a link
Also added an icon next to the link and moved the location via CSS.
2017-08-07 17:08:17 +08:00
Mark Nelson
1f219af560 #115 Prevent PDF being polluted with HTML at the EOF 2017-05-31 16:16:15 +08:00
Mark Nelson
e341d28853 Show a link to manage templates 2016-08-25 18:44:52 +08:00
Mark Nelson
317b737e96 Uncapitalised usage of the 'context_system' class 2016-08-25 12:11:38 +08:00
Mark Nelson
362cc5f092 Fixed issue where page with id 1 exists 2016-02-20 18:11:58 +08:00
Mark Nelson
6889b04df0 Created one function to handle move_* actions
This changes the name of a column in a DB table.
No upgrade script has been written as this activity
has not been officially released.
2016-02-20 18:09:46 +08:00
Mark Nelson
d848bc73e8 Keep action links consistent 2016-02-20 17:12:32 +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
87d1ecfcc7 Removed the 'Download grid' functionality 2015-12-06 16:54:19 +08:00
Mark Nelson
e85807e298 Fixed sequence values when deleting an element 2015-03-13 23:44:37 -07:00
Mark Nelson
74003bf0bb Moved file manager to the image element 2015-03-13 23:37:07 -07:00
Mark Nelson
7a2675e889 Moved internal functions to locallib.php 2015-03-13 23:37:06 -07: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
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
5203d81980 Changed PHPDocs and added date to the copyright to match Moodle coding guidelines 2013-07-22 13:06:18 +08:00
Mark Nelson
e811303e84 Passed a new variable 'preview' to the render function
This variable determines whether we are viewing the custom certificate for a particular user, or if we are simply previewing it. This may be needed for some elements. For example, an element may retrieve the data for when the custom certificate was issued, but if the user has just set up the custom certificate and no issue has been created then this data is missing, so in this case we pass that the user is previewing the custom certificate so other data can be shown.
2013-06-28 15:27:04 +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
Mark Nelson
59ea1afd75 Removed unnecessary second parameter for the render function 2013-06-06 11:14:06 +08:00
Mark Nelson
010aa564e1 Changed the last parameter passed to get_string 2013-05-28 17:33:17 +08:00
Mark Nelson
a513ba8038 Added functionality to preview the custom certificate 2013-05-17 11:09:22 +08:00
Mark Nelson
4962b72938 The first page is now created when the customcert instance is added and the button to create new pages has been moved 2013-05-16 18:27:58 +08:00
Mark Nelson
faedb6f7e0 Removed return statement that prevented the rest of the script from executing 2013-05-16 13:17:42 +08:00
Mark Nelson
d8677842d3 Used the moodle_url class rather than $CFG->wwwroot for links 2013-05-16 13:17:42 +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
47b79abf6c Added spacing around '=>' 2013-04-26 16:41:08 +08:00
Mark Nelson
9e36732d5f Updated package and removed subpackage from PHPDocs 2013-04-26 15:39:59 +08:00
Mark Nelson
0bc2e186e6 Added the ability to change the order the customcert elements are displayed
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-04-12 17:33:23 +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