I am considering using the 'certificate' module to create certificates for my students after they have successfully completed a 'scorm_cloud' course. Currently, the results for a course/student are exposed to Views and also displayed on the course node itself. The results are also tokenized and available for the current user in the course node context.

1. Is the link to the PDF certificate for a particular course node / student a CCK field?
2. If so I guess I can display the link in a View or on a node as I please?
3. How can I control access to certificate according to if the student has passed the course?
4. How do I design the certificate template? Can I add images?
5. Last time I tried to get PDFs working with the 'print' module I had trouble. Does it work for you? What PDF generator do you recommend?

Ok, thanks for your help,

Jeff

Comments

djdevin’s picture

1. The link to download a PDF is a menu tab, it's access is governed by hook_access_certificate
2. Yep (node/1/certificate)
3. Take a look at hook_access_certificate

/**
 * Implementation of hook_access_certificate().
 *
 * Any module wishing to award a certificate based on arbitrary criteria should
 * implement this hook. The $node is the node in question, the $user is the user
 * viewing the node.
 *
 * @return mixed
 *   FALSE if user should not be shown the menu tab or link.
 *   TRUE if user should be able to download a certificate.
 *   A string if the user should be displayed a friendly message instead.
 */
function hook_access_certificate($node, $user) {
  if ($user->score > $node->pass_rate) {
    // Let the user get a certificate if they passed something.
    return TRUE;
  }
}

4. You create certificate templates, which are nodes and can have images/css etc. They are then mapped to a number of different things. (And rules support is almost finished).
5. I recommend wkhtmltopdf, it is a webkit-based PDF generator, meaning it supports most (if not all) HTML/CSS. Our mileage varied with other solutions like tcpdf and dompdf.

webservant316’s picture

Thanks for the quick reply. I will check it out.

djdevin’s picture

Status: Active » Postponed (maintainer needs more info)
djdevin’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)