You are here

public function MatchingQuestion::getMaximumScore in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 question_types/quiz_matching/src/Plugin/quiz/QuizQuestion/MatchingQuestion.php \Drupal\quiz_matching\Plugin\quiz\QuizQuestion\MatchingQuestion::getMaximumScore()
  2. 6.x question_types/quiz_matching/src/Plugin/quiz/QuizQuestion/MatchingQuestion.php \Drupal\quiz_matching\Plugin\quiz\QuizQuestion\MatchingQuestion::getMaximumScore()

Get the maximum possible score for this question.

Return value

int

Overrides QuizQuestionEntityTrait::getMaximumScore

File

question_types/quiz_matching/src/Plugin/quiz/QuizQuestion/MatchingQuestion.php, line 111
Matching classes.

Class

MatchingQuestion
@QuizQuestion ( id = "matching", label = Plugin annotation @Translation("Matching question"), handlers = { "response" = "\Drupal\quiz_matching\Plugin\quiz\QuizQuestion\MatchingResponse" } )

Namespace

Drupal\quiz_matching\Plugin\quiz\QuizQuestion

Code

public function getMaximumScore() {
  return count($this
    ->get('quiz_matching')
    ->referencedEntities());
}