function quiz_certificate_access_certificate in Certificate 6.2
Same name and namespace in other branches
- 8.3 modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
- 6 modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
- 7.3 modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
- 7.2 modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
- 4.x modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
- 3.x modules/quiz_certificate/quiz_certificate.module \quiz_certificate_access_certificate()
Implementation of hook_access_certificate().
File
- modules/
quiz_certificate/ quiz_certificate.module, line 6
Code
function quiz_certificate_access_certificate($node, $user) {
if ($node->type == 'quiz') {
$results = _quiz_get_results($node->nid, $user->uid);
foreach ($results as $rid => $result) {
if ($result['time_end'] && $result['score'] >= $node->pass_rate) {
return TRUE;
}
}
}
}