function CourseController::completionAccess in Course 3.x
Same name and namespace in other branches
- 8.3 src/Controller/CourseController.php \Drupal\course\Controller\CourseController::completionAccess()
- 8.2 src/Controller/CourseController.php \Drupal\course\Controller\CourseController::completionAccess()
Access callback for completion page.
1 string reference to 'CourseController::completionAccess'
File
- src/
Controller/ CourseController.php, line 22
Class
Namespace
Drupal\course\ControllerCode
function completionAccess(Course $course) {
$account = \Drupal::currentUser();
return AccessResult::allowedIf($course
->isEnrolled($account));
}