You are here

function CourseObjectQuiz::getViewUrl in Course 3.x

The view URL of the quiz.

Overrides CourseObject::getViewUrl

File

modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php, line 75

Class

CourseObjectQuiz
Plugin annotation @CourseObject( id = "quiz", label = "Quiz", handlers = { "fulfillment" = "\Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuizFulfillment" } )

Namespace

Drupal\course_quiz\Plugin\course\CourseObject

Code

function getViewUrl() {
  return Url::fromRoute('entity.quiz.canonical', [
    'quiz' => $this
      ->getInstanceId(),
  ]);
}