You are here

function CourseObjectNode::access in Course 7

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::access()

Deny access to objects without content.

Overrides CourseObject::access

File

includes/CourseObjectNode.inc, line 442

Class

CourseObjectNode
A course object that uses a node as a base.

Code

function access($op = 'view', $account = NULL) {
  if ($op == 'take' && !$this
    ->getNode()) {
    return FALSE;
  }
  return parent::access($op, $account);
}