You are here

QuizPageResponse.php in Quiz 6.x

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 {

  /**
   * {@inheritdoc}
   */
  public function score(array $values) : ?int {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function isCorrect() : bool {
    return TRUE;
  }

  /**
   * {@inheritdoc}
   */
  public function getResponse() {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function getReportForm() : array {
    return [
      '#no_report' => TRUE,
    ];
  }

}

Classes

Namesort descending Description
QuizPageResponse Extension of QuizQuestionResponse.