Forums
Hi,
Sorry if this question is already answered. And for my english... I've test to use a rule to provide a certificate at the end of a course. I've added to a rule component the famous "Award certificate" action. I didn't find the way to see a download link on the result page... I searched on the code and find in opigno_quiz_app_quiz_finished that the event "User has passed a quiz" is fired (opigno_quiz_app_rules_quiz_passed). So what to do with that ? I would like to create a rule who provide a system message with the link to download the certificate. My problem is that i don't know how to write this link ... Is someone could help me to understand why the certificate module try to map certificates on rule's components and not on rules direcltly :
function certificate_certificate_map_options() {
$options = array();
if (module_exists('rules')) {
$rules = array();
foreach (rules_get_components() as $key => $ruleset) {
if (array_search('certificate', $ruleset->tags) !== FALSE) {
$rules[$key] = $ruleset->label;
}
}
$options['rules'] = array(
'title' => t('Rules'),
'options' => $rules,
'description' => t('When a rule or ruleset ends with "Award certificate", the selected certificate will be awarded.'),
);
}
**THanks ! **