You are here

QuizPageResponse.php in Quiz 8.5

File

question_types/quiz_page/src/Plugin/quiz/QuizQuestion/QuizPageResponse.php
View source
<?php

namespace Drupal\quiz_page\Plugin\quiz\QuizQuestion;

use Drupal\quiz\Entity\QuizResultAnswer;

/**
 * Extension of QuizQuestionResponse.
 */
class QuizPageResponse extends QuizResultAnswer {
  public function score(array $values) {
  }

  /**
   * Implementation of isCorrect().
   *
   * @see QuizQuestionResponse::isCorrect()
   */
  public function isCorrect() {
    return TRUE;
  }

  /**
   * Implementation of getResponse().
   *
   * @see QuizQuestionResponse::getResponse()
   */
  public function getResponse() {
    return $this->answer;
  }

  /**
   * Implementation of getReportForm().
   *
   * @see QuizQuestionResponse::getReportForm()
   */
  public function getReportForm() {
    return array(
      '#no_report' => TRUE,
    );
  }

}

Classes

Namesort descending Description
QuizPageResponse Extension of QuizQuestionResponse.