You are here

public function Course::unEnroll in Course 7

Same name and namespace in other branches
  1. 6 includes/course.core.inc \Course::unEnroll()

Un-enroll the user from all course objects and revoke access.

Course object should clean up and delete records related to this Course and user.

NOT a top level class of CourseObject::unEnroll.

See also

CourseObjectNode::revoke()

File

includes/Course.inc, line 224

Class

Course
An object that holds CourseObjects and tracker functions?

Code

public function unEnroll() {
  foreach ($this
    ->getObjects() as $courseObject) {

    // Remove access.
    $courseObject
      ->revoke();
    $courseObject
      ->unEnroll();
  }
}