function CourseObjectFulfillment::optionsDefinition in Course 7
Same name and namespace in other branches
- 7.2 includes/CourseObjectFulfillment.inc \CourseObjectFulfillment::optionsDefinition()
Allow arbitrary data to be stored on the fulfillment, without explicitly defining optionsDefinition() in a custom class.
It is suggested that modules provide their own fulfillment classes and specify the valid extra options through their own optionsDefinition(). See CourseObjectWebformFulfillment for an example of this.
Overrides CourseHandler::optionsDefinition
3 methods override CourseObjectFulfillment::optionsDefinition()
- CourseObjectQuizFulfillment::optionsDefinition in modules/
course_quiz/ course_quiz.classes.inc - Define storage for quiz result IDs.
- CourseObjectTestFulfillment::optionsDefinition in tests/
course_test/ course_test.classes.inc - Define storage for fulfillment values.
- CourseObjectWebformFulfillment::optionsDefinition in modules/
course_webform/ course_webform.classes.inc - Define storage for submission IDs.
File
- includes/
CourseObjectFulfillment.inc, line 91
Class
- CourseObjectFulfillment
- Parent class for course object fulfillment.
Code
function optionsDefinition() {
$options = get_object_vars($this);
unset($options['entityInfo']);
return $options;
}