You are here

public function ContentTypeILT::getStartContentUrl in Opigno Instructor-led Trainings 8

Same name and namespace in other branches
  1. 3.x src/Plugin/OpignoGroupManagerContentType/ContentTypeILT.php \Drupal\opigno_ilt\Plugin\OpignoGroupManagerContentType\ContentTypeILT::getStartContentUrl()

Get the URL object for starting the quiz.

Parameters

int $content_id: The content ID (ex: node ID).

int $group_id: The group ID (optional).

Return value

\Drupal\Core\Url The URL to use to start the "test" for a student.

Overrides ContentTypeBase::getStartContentUrl

File

src/Plugin/OpignoGroupManagerContentType/ContentTypeILT.php, line 70

Class

ContentTypeILT
Class ContentTypeILT.

Namespace

Drupal\opigno_ilt\Plugin\OpignoGroupManagerContentType

Code

public function getStartContentUrl($content_id, $group_id = NULL) {
  return Url::fromRoute('entity.opigno_ilt.canonical', [
    'opigno_ilt' => $content_id,
  ]);
}