Send Quiz Certificates by Email* module is part of the Pro Suite of modules for the Uncanny LearnDash Toolkit. Out of the box, LearnDash supports dynamic generation of a certificate after successful completion of a quiz, but the certificate must be viewed online or downloaded to the user’s computer. This Pro module extends LearnDash functionality to attach a certificate to the email that is sent to the user upon the successful completion of a quiz. The certificate email can also be sent to site administrators, group leader(s) or any number of related users.
*This module will send out email with certificate with any quiz that has a certificate associated with it AND user e-mail notification enabled. This module is for sending certificates that are attached to quizzes. For sending certificates that are attached to courses, use this module instead.
Setting Up the User Email
This module uses LearnDash Quiz Email settings to customize the email sent to users. You can find the LearnDash quiz email settings at LearnDash LMS > Quizzes > Settings (Tab).
After you’ve configured the email settings, you will then have to enable User e-mail notification in each quiz containing a certificate you want emailed to the user.
Additional Module Settings
This module by default stores certificates on server. This option can be disabled by checking Do not store certificates on server.
If you want a copy of the certificate sent to the Site Admin and/or Group Leader(s), simply check the respective boxes. You may also include CC’d users in the CC Certificate To field.
The Admin/Group Leader Email Subject & Admin/Group Leader Email Body fields control the email content for emails sent to the site admin, group leader(s) and cc recipients. Tokens are available and listed just below the Email Body field.
Note: These settings do not affect the email received by the user. The email sent to users must be configured in the LearnDash quiz options screen (see below).
Filters for Developers
This module provides a number of filters for developers:
Modify default save path uo_quiz_certificate_save_path return new path, defaults to: /uploads/user-certificates/
Modify default filename uo_quiz_completion_certificate_filename // returns filename. Passed arguments: $file_name //default filename $user_id //current user id $quiz_id //current quiz id $certificate_post //certificate post self::$current_time_stamp //quiz completion time
whether to generate certificate or not uo_generate_quiz_certificate return true/false Default: True
Modify HTTP url of the certificate.. mandatory if path is changed uo_quiz_certificate_http_url passed default http url return new path
Modify certificate content on-the-fly uo_generate_quiz_certificate_content Default: certificate content arguments passed: $content //default certificate content $user_id //user id $quiz_id //quiz id $course_id //course id that the quiz belonged to Usage: add user_id or quiz_id or course_id to a shortcode in the content.
Example: preg_replace( '/(\[usermeta)/', '[usermeta user_id="' . $user_id . '" ', $content );