You are here

function CourseObjectAccessTiming::see in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/course/CourseObjectAccess/CourseObjectAccessTiming.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessTiming::see()
  2. 8.2 src/Plugin/course/CourseObjectAccess/CourseObjectAccessTiming.php \Drupal\course\Plugin\course\CourseObjectAccess\CourseObjectAccessTiming::see()

Can the user see the object in the outline?

Parameters

type $account:

Return value

boolean

Overrides CourseObjectAccessPluginBase::see

File

src/Plugin/course/CourseObjectAccess/CourseObjectAccessTiming.php, line 52

Class

CourseObjectAccessTiming
Plugin annotation @CourseObjectAccess( id = "timing", label = @Translation("Timing"), )

Namespace

Drupal\course\Plugin\course\CourseObjectAccess

Code

function see($account) {
  if (!$this
    ->isReleased() && $this
    ->getOption('release_hidden')) {
    return FALSE;
  }
  if ($this
    ->isExpired() && $this
    ->getOption('expiration_hidden')) {
    return FALSE;
  }
}