You are here

public function Course::unEnroll in Course 6

Same name and namespace in other branches
  1. 7 includes/Course.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.core.inc, line 585
course.core.inc File for main Course class.

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();
  }
}