quiz_certificate.module in Certificate 8.3
Same filename and directory in other branches
- 6.2 modules/quiz_certificate/quiz_certificate.module
- 6 modules/quiz_certificate/quiz_certificate.module
- 7.3 modules/quiz_certificate/quiz_certificate.module
- 7.2 modules/quiz_certificate/quiz_certificate.module
- 4.x modules/quiz_certificate/quiz_certificate.module
- 3.x modules/quiz_certificate/quiz_certificate.module
File
modules/quiz_certificate/quiz_certificate.moduleView source
<?php
/**
* Implements hook_access_certificate().
*/
function quiz_certificate_access_certificate($node, $user) {
if ($node->type == 'quiz') {
$results = entity_load('quiz_result', FALSE, array(
'nid' => $node->nid,
'uid' => $user->uid,
));
foreach ($results as $result) {
if ($result->score >= $node->pass_rate) {
return TRUE;
}
}
}
}
Functions
Name | Description |
---|---|
quiz_certificate_access_certificate | Implements hook_access_certificate(). |