You are here

public function CourseObjectNode::getTakeUrl in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObjectNode.inc \CourseObjectNode::getTakeUrl()
  2. 7 includes/CourseObjectNode.inc \CourseObjectNode::getTakeUrl()

Get the URL to take this course object, if any.

Outline handlers or subclasses should use getUrl().

Return value

string

Overrides CourseObject::getTakeUrl

1 method overrides CourseObjectNode::getTakeUrl()
CourseObjectQuiz::getTakeUrl in modules/course_quiz/course_quiz.classes.inc
The take URL of the quiz is /take.

File

includes/course_object.core.inc, line 1098

Class

CourseObjectNode
A course object that uses a node as a base.

Code

public function getTakeUrl() {
  if ($this
    ->getInstanceId()) {
    return url("node/{$this->node->nid}");
  }
}