You are here

function CourseObjectFulfillment::setComplete in Course 7

Same name and namespace in other branches
  1. 6 includes/course_object.core.inc \CourseObjectFulfillment::setComplete()
  2. 7.2 includes/CourseObjectFulfillment.inc \CourseObjectFulfillment::setComplete()

Set this fulfillment complete.

Parameters

bool $complete: Set to 0 to un-complete, 1 or omit to complete.

Return value

CourseObjectFulfillment

File

includes/CourseObjectFulfillment.inc, line 28

Class

CourseObjectFulfillment
Parent class for course object fulfillment.

Code

function setComplete($complete = 1) {
  if (!$this
    ->getOption('date_completed')) {
    $this
      ->setOption('date_completed', REQUEST_TIME);
  }
  return $this
    ->setOption('complete', $complete);
}