You are here

function CourseObjectAccessTiming::isReleased in Course 6

Same name and namespace in other branches
  1. 7.2 plugins/course_object_access/timing.inc \CourseObjectAccessTiming::isReleased()
  2. 7 plugins/course_object_access/timing.inc \CourseObjectAccessTiming::isReleased()
2 calls to CourseObjectAccessTiming::isReleased()
CourseObjectAccessTiming::see in plugins/course/access/timing.inc
CourseObjectAccessTiming::take in plugins/course/access/timing.inc

File

plugins/course/access/timing.inc, line 124

Class

CourseObjectAccessTiming

Code

function isReleased() {
  if (time() <= strtotime($this
    ->getOption('release'))) {
    $this
      ->getCourseObject()
      ->setAccessMessage('not-open', t('This activity will be available on @release.', array(
      '@release' => $this
        ->getOption('release'),
    )));
    return FALSE;
  }
  else {
    return TRUE;
  }
}