You are here

class CourseObjectTest in Course 7

Same name and namespace in other branches
  1. 6 tests/course_test/course_test.classes.inc \CourseObjectTest
  2. 7.2 tests/course_test/course_test.classes.inc \CourseObjectTest

Dummy example course object.

Hierarchy

Expanded class hierarchy of CourseObjectTest

1 string reference to 'CourseObjectTest'
course_test_course_handlers in tests/course_test/course_test.module
Implements hook_course_handlers().

File

tests/course_test/course_test.classes.inc, line 6

View source
class CourseObjectTest extends CourseObject {
  public static function getMaxOccurences() {
    return 3;
  }
  public function take() {
    return t('I am a test course object with the title !title', array(
      '!title' => $this
        ->getOption('title'),
    ));
  }
  public function optionsDefinition() {
    $options = parent::optionsDefinition();
    $options['test_option'] = NULL;
    return $options;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CourseHandler::addOptions final public function Merge an array of options onto the existing options.
CourseHandler::getAccessMessages public function Get an array of access messages.
CourseHandler::getDatabaseFields protected function Return an array of database fields. This determines what fields should be serialized instead of stored.
CourseHandler::getId function
CourseHandler::getOption public function Get an handler option's value.
CourseHandler::getWarnings public function Return a list of warning strings about this handler. 1
CourseHandler::optionsMerge private function Merge arrays with replace, not append.
CourseHandler::setAccessMessage public function Set an access message to be displayed along with the course object when it is in the outline. For example, "This activity will open on XYZ" or "Please complete Step 1 to take this activity."
CourseHandler::setOption public function Set an option for this handler.
CourseHandler::setOptions final public function Set this entire handler's options.
CourseHandler::__construct function Overrides Entity::__construct 1
CourseObject::$accessMessages protected property
CourseObject::access public function Access functionality for course objects. 1
CourseObject::buildContent function Builds a structured array representing the entity's content. Overrides Entity::buildContent
CourseObject::context public static function Set the context of which course this course object belongs to. 1
CourseObject::create public function Creates a course object. 1
CourseObject::delete public function Deletes a course object's external resources. Overrides Entity::delete 1
CourseObject::freeze function 1
CourseObject::getCloneAbility function Returns an translated error message if this object has issues with cloning. 2
CourseObject::getComponent function Get the object component for this course object.
CourseObject::getComponentName function Get the object component title for this course object.
CourseObject::getCourse function Get the Course that contains this CourseObject.
CourseObject::getCourseNid function Get the course node ID this CourseObject belongs to.
CourseObject::getEditUrl public function Get the URL to edit this course object, if any. 1
CourseObject::getFulfillment public function Get the user's fulfillment for this course object.
CourseObject::getInstanceId function Get the instance ID. This could be the external component ID, a Node ID...
CourseObject::getModule function Get the module that provides this course object.
CourseObject::getOptions public function Get options, with session options, except weight, having precedence. Overrides CourseHandler::getOptions
CourseObject::getOptionsSummary public function Get core options summary. Overrides CourseHandler::getOptionsSummary 1
CourseObject::getReport function Let the course object provide its own reports. 4
CourseObject::getReports function Let the course object provide its own reports. 4
CourseObject::getStatus public function Get the user's status in this course object. 2
CourseObject::getTakeType public function How should this course object be executed? 2
CourseObject::getTakeUrl protected function Get the URL to take this course object, if any. 1
CourseObject::getTitle function 1
CourseObject::getUrl public function Return the URL to the course object router.
CourseObject::getUser public function
CourseObject::getViewUrl public function Get the URL to view this course object, if any. 1
CourseObject::grant function Grant access to the external course object. 1
CourseObject::hasPolling public function Specify whether fulfillment uses asynchronous polling. 2
CourseObject::isActive public function
CourseObject::isGraded function Is this object graded? 2
CourseObject::isRequired public function Is this course object required for course completion?
CourseObject::isSkippable public function If this course object is required, can be it skipped?
CourseObject::isTemporary function Checks the temporary status of a course object.
CourseObject::optionFilter private function
CourseObject::optionsForm public function Default options form for all course objects. Overrides CourseHandler::optionsForm 3
CourseObject::optionsSubmit public function Save object configs to cache. Overrides CourseHandler::optionsSubmit 1
CourseObject::optionsValidate public function Validate? Overrides CourseHandler::optionsValidate 1
CourseObject::overrideNavigation public function Override navigation links. 1
CourseObject::overrideOutlineListItem public function Overrides a course outline list item. 1
CourseObject::poll function Give the course object a chance do asynchronous polling and set completion on demand.
CourseObject::renderOptionsSummary public function Get all course object implementations of getOptionsSummary().
CourseObject::revoke function Revoke access to the external course object. 1
CourseObject::save public function Let objects create their instances before saving the course object. Overrides CourseHandler::save 1
CourseObject::setComponent function Set the object component for this course object.
CourseObject::setCourse public function Set the Course for this CourseObject.
CourseObject::setDelete public function Mark this object for deletion.
CourseObject::setId function Set the internal course object ID.
CourseObject::setInstanceId function Set this object's instance ID. 1
CourseObject::setModule function Set the module that provides this course object.
CourseObject::setUser public function
CourseObject::takeCourseObject final public function Take a course object.
CourseObject::thaw function 1
CourseObject::unEnroll function Remove any records associated with this course object for the user. 2
CourseObject::uri public function Generate URI from course object. Overrides Entity::uri
CourseObjectTest::getMaxOccurences public static function Return the number of occurances that can be in a course at the same time. For example, the design of the Certificate module can only have 1 set of mappings per node. The same goes for Course Credit. We may also want a course object that can only be… Overrides CourseObject::getMaxOccurences
CourseObjectTest::optionsDefinition public function Define configuration elements and their defaults. Overrides CourseObject::optionsDefinition
CourseObjectTest::take public function Overrides CourseObject::take
Entity::$defaultLabel protected property 1
Entity::$entityInfo protected property
Entity::$entityType protected property
Entity::$idKey protected property
Entity::$wrapper protected property
Entity::bundle public function Returns the bundle of the entity. Overrides EntityInterface::bundle
Entity::defaultLabel protected function Defines the entity label if the 'entity_class_label' callback is used. 1
Entity::defaultUri protected function Override this in order to implement a custom default URI and specify 'entity_class_uri' as 'uri callback' hook_entity_info().
Entity::entityInfo public function Returns the info of the type of the entity. Overrides EntityInterface::entityInfo
Entity::entityType public function Returns the type of the entity. Overrides EntityInterface::entityType
Entity::export public function Exports the entity. Overrides EntityInterface::export
Entity::getTranslation public function Gets the raw, translated value of a property or field. Overrides EntityInterface::getTranslation
Entity::hasStatus public function Checks if the entity has a certain exportable status. Overrides EntityInterface::hasStatus
Entity::identifier public function Returns the entity identifier, i.e. the entities name or numeric id. Overrides EntityInterface::identifier
Entity::internalIdentifier public function Returns the internal, numeric identifier. Overrides EntityInterface::internalIdentifier
Entity::isDefaultRevision public function Checks whether the entity is the default revision. Overrides EntityInterface::isDefaultRevision
Entity::label public function Returns the label of the entity. Overrides EntityInterface::label
Entity::setUp protected function Set up the object instance on construction or unserializiation.
Entity::view public function Generate an array for rendering the entity. Overrides EntityInterface::view
Entity::wrapper public function Returns the EntityMetadataWrapper of the entity. Overrides EntityInterface::wrapper
Entity::__sleep public function Magic method to only serialize what's necessary.
Entity::__wakeup public function Magic method to invoke setUp() on unserialization.