You are here

function course_unenroll in Course 3.x

Same name and namespace in other branches
  1. 8.3 course.module \course_unenroll()
  2. 8.2 course.module \course_unenroll()
  3. 7.2 course.module \course_unenroll()
  4. 7 course.module \course_unenroll()

Un-enroll the user.

Deletes course report entries, course enrollments, and object fulfillment records.

Parameters

Course $node: A course node.

AccountInterface $user: A user.

Deprecated

Use Course::unEnroll($account);

File

./course.module, line 224
course.module Core functionality for Courses.

Code

function course_unenroll(Course $course, AccountInterface $account) {
  return $course
    ->unEnroll($account);
}