Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Certificate Module: Difference between revisions

From MoodleDocs
Line 45: Line 45:
Orientation is now a variable (an option chosen upon creation).
Orientation is now a variable (an option chosen upon 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.
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 types have been updated to reflect new tcpdf code, e.g. text is printed using write_html.
 
All $x, $y, $w,$h are now 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.

Revision as of 15:41, 20 June 2009

Note: This page is a work-in-progress. Feedback and suggested improvements are welcome. Please join the discussion on moodle.org or use the page comments.

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

The basis

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.

  1. 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.
  2. 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
    • With:
      • All the specified quizzes must be passed (logical AND between them). (b)
      • All the specified surveys must be filled (logical AND between them). (c)
    • Finally:
      • Then (a OR b) AND c will be checked to allow display/download.
  3. 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.
  4. 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.
  5. Find a better solution for the preview certificate feature. Analyse the XHTML strict object alternative.
  6. Allow to configure if the student/mainteacher/admin should receive one email with the text: Mickey Mouse accessed the certifacte on XX/XX/YYYY".
  7. Coma separated list of email addresses to be informed about certificate accesses.
  8. Roles, accessibility ...
  9. Rework backup/restore to handle everything above.

Changes planned for Moodle 2.0

PDF Creation

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 has been updated to reflect new options in tcpdf, e.g. the draw_frame functions have been simplified.

Orientation is now a variable (an option chosen upon 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 types have been updated to reflect new tcpdf code, e.g. text is printed using write_html.

All $x, $y, $w,$h are now 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.