You are here

public function CourseObjectQuiz::getTakeType in Course 3.x

Same name and namespace in other branches
  1. 8.3 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getTakeType()
  2. 8.2 modules/course_quiz/src/Plugin/course/CourseObject/CourseObjectQuiz.php \Drupal\course_quiz\Plugin\course\CourseObject\CourseObjectQuiz::getTakeType()

How should this course object be executed?

  • iframe: display an iframe with getTakeUrl() in it
  • popup: launch getTakeUrl() in a popup
  • modal: launch getTakeUrl() in a modal
  • content: print the value from take() (or do whatever the module wants to do)

Overrides CourseObject::getTakeType

File

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

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

public function getTakeType() {
  return 'redirect';
}