You are here

function CourseObjectFulfillment::setGrade in Course 8.3

Same name and namespace in other branches
  1. 8.2 src/Entity/CourseObjectFulfillment.php \Drupal\course\Entity\CourseObjectFulfillment::setGrade()
  2. 3.x src/Entity/CourseObjectFulfillment.php \Drupal\course\Entity\CourseObjectFulfillment::setGrade()

Set this fulfillment's grade.

Parameters

float $grade:

Return value

CourseObjectFulfillment

File

src/Entity/CourseObjectFulfillment.php, line 113

Class

CourseObjectFulfillment
Parent class for course object fulfillment. Unlike Course objects, this is not abstract and can be used when the fulfillment requirements are simple.

Namespace

Drupal\course\Entity

Code

function setGrade($grade) {
  return $this
    ->setOption('grade_result', $grade);
}