You are here

QuizDirectionsResponse.php in Quiz 6.x

File

question_types/quiz_directions/src/Plugin/quiz/QuizQuestion/QuizDirectionsResponse.php
View source
<?php

namespace Drupal\quiz_directions\Plugin\quiz\QuizQuestion;

use Drupal\quiz\Entity\QuizResultAnswer;

/**
 * Extension of QuizQuestionResponse.
 */
class QuizDirectionsResponse extends QuizResultAnswer {

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

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

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

}

Classes

Namesort descending Description
QuizDirectionsResponse Extension of QuizQuestionResponse.