function course_unenroll in Course 8.3
Same name and namespace in other branches
- 8.2 course.module \course_unenroll()
- 7.2 course.module \course_unenroll()
- 7 course.module \course_unenroll()
- 3.x 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);
2 calls to course_unenroll()
- course_rules_action_course_unenroll in includes/
course.rules.inc - Rules action handler for unenrollment.
- course_user_delete in ./
course.module - Implements hook_user_delete().
File
- ./
course.module, line 222 - course.module Core functionality for Courses.
Code
function course_unenroll(Course $course, AccountInterface $account) {
return $course
->unEnroll($account);
}