You are here

function CourseObjectQuiz::getTakeUrl in Course 7

Same name and namespace in other branches
  1. 6 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::getTakeUrl()
  2. 7.2 modules/course_quiz/course_quiz.classes.inc \CourseObjectQuiz::getTakeUrl()

The take URL of the quiz is /take.

Overrides CourseObjectNode::getTakeUrl

File

modules/course_quiz/course_quiz.classes.inc, line 19

Class

CourseObjectQuiz

Code

function getTakeUrl() {
  if ($this
    ->getOption('quiz_goto') == "view") {
    return url("node/{$this->node->nid}");
  }
  else {
    return url("node/{$this->node->nid}/take");
  }
}