This page will show the new features and the plan to implement them in the Certificate module for each Moodle release.
Changes planned for Moodle 1.8 contrib branch
Point to decide: Before start. Where will be develop the 1.8 version:
- a) These will be developed under HEAD and backported to 18_STABLE once finished.
- b) These will be developed directly under 18_STABLE, meging to HEAD while advancing.
Every one of the features described below will have its own bug created in the Tracker. With links from here for easy location.
The ordered list of features
(each one will be marked with Not done!, In progress!, Done!, with the name of the developer assigned between brackets.
- Update the module install.xml and create the upgrade.php file (confirm save->savecert is the first change to be added for 1.8!). This will provide cross db installation and upgrade of the module.
- Split conditions to allow certificate to a new fieldset.
- Conditions will be:
- a) % of total grade raised.
- b) 1...n quizzes grades raised.
- c) 1...n surveys filled by the student
- All the specified quizzes must be passed (logical AND between them). (b)
- All the specified surveys must be filled (logical AND between them). (c)
- Then (a OR b) AND c will be checked to allow display/download.
- Conditions will be:
- Define n texts, with position and size to be inserted in the certificate ordering them by y,x descending. Fieldset can be hidden/showed like the user profile form.
- Upload (to moddata/certificate) and define n images, with position and size to be inserted in the certificate ordering them by y,x descending. Fieldset can be hidden/showed like the user profile form.
- Find a better solution for the preview certificate feature. Analyse the XHTML strict object alternative.
- Allow to configure if the student/mainteacher/admin should receive one email with the text: Mickey Mouse accessed the certifacte on XX/XX/YYYY".
- Coma separated list of email addresses to be informed about certificate accesses.
- Roles, accessibility ...
- Rework backup/restore to handle everything above.
Changes planned for Moodle 2.0
The certificate will no longer use the fpdf library, it will use only the tcpdf library via the new lib/pdflib.php which will be called from view.php.
The code in lib used to print a certificate has been updated to reflect new options in tcpdf, e.g. the draw_frame functions have been simplified using SetLineStyle and Rect and cert_printtext now uses writeHTMLCell.
The new printtext function accepts html and wraps long lines.
Orientation is now a variable (an option chosen upon certificate creation).
There will be four new default certificate types dependent upon paper size (A4 or Letter) and font embedding (embedded or non-embedded). db/upgrade has been modified so that upon upgrade, previous landscape certificate types will upgraded with the landscape orientation and portrait types will be upgraded with the new portrait orientation. Previous certificate types will be changed to their appropriate new types. This means that any custom made certificate types will have to be updated accordingly.
The default types will use the dejavusans font for embedding, and Helvetica and Times for non-embedded fonts. Non-embedded fonts are recommended whenever possible to greatly reduce the size of the pdf.
All $x, $y, $w,$h (e.g. x,y variables for text, x,y,w,h variables for border, etc.) each now have two sets of variables--one for landscape and one for portrait, making it easier to customize placement and images.
Watermark images are now printed with an alpha setting, making it easier to customize a watermark image.
Each certificate is now created with the pdf title set as the certificate name.
There will be a new option: Reissue Certificates that can be set upon certificate creation. If this option is set to Yes, then each time a user clicks to receive a certificate, a new entry will be made in the certificate_issues table with new date, grade, code, etc. Report.php and index.php will show only the last created certificate for each student(?). This code development was supported by Lester Cunningham.
The activity locking code will no longer be available. The certificate will instead use the core conditional activities code. Any previous certificates using the activity locking code will have to be updated (edited and re-set) upon upgrade.