You are here

function course_remove_enrollment_action in Course 6

Same name and namespace in other branches
  1. 7.2 course.module \course_remove_enrollment_action()
  2. 7 course.module \course_remove_enrollment_action()

Action to unenrol a user.

File

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

Code

function course_remove_enrollment_action(&$enrollment, $context) {
  $node = node_load(arg(1));
  $user = user_load($enrollment->uid);
  course_unenrol($node, $user);
}