Change record status: 
Project: 
Introduced in branch: 
7.x-2.x
Introduced in version: 
7.x-2.0-alpha1
Description: 

User not stored in object

$account must be passed to getFulfillment($account) and getTracker($account)

This is to improve performance as it means that Courses and Course objects can be cached without caching the user's access to them.

Old:

  // Find the course object associated with this webform and get the fulfillment for the user.
  if ($courseObject = course_get_course_object('course_webform', 'webform', arg(1), $user)) {
    $fulfillment = $courseObject->getFulfillment();

New:

  // Find the course object associated with this webform and get the fulfillment for the user.
  if ($courseObject = course_get_course_object('course_webform', 'webform', arg(1))) {
    $fulfillment = $courseObject->getFulfillment($user);

Course access plugins will also require intaking $account as that will be no longer accessible from the object or course.

This affects:

CourseObjectAccess::see($account)
CourseObjectAccess::take($account)
CourseObjectAccess::view($account)

grant() and revoke() moved to fulfillment

If your module does it's own remote grant and fulfillment (example: granting access into remote content on object start) those methods will have to change. They have been moved to the fulfillment object which has user context.

unEnroll() removed

If your module does it's own cleanup on fulfillment deletion, it needs to move the contents of unEnroll into an overridden delete() method. The custom unEnroll() is removed in favor of Entity API's delete().

course_get_course_object

This function has changed to no longer accept the user.

Impacts: 
Module developers