You are here

function CourseObjectNode::revoke in Course 6

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

Duration expired (or something) - CourseObject is telling us so.

Overrides CourseObject::revoke

File

includes/course_object.core.inc, line 1264

Class

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

Code

function revoke() {
  if ($this
    ->hasNodePrivacySupport()) {
    if ($this
      ->getOption('private')) {
      $uid = $this->user->uid;
      module_load_include('inc', 'content_access', 'content_access.admin');
      $acl_id = content_access_get_acl_id($this->node, 'view');
      acl_remove_user($acl_id, $uid);
      node_save($this->node);
    }
  }
}