You are here

public function LongAnswerQuestion::getMaximumScore in Quiz 8.6

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

Get the maximum possible score for this question.

Return value

int

Overrides QuizQuestionEntityTrait::getMaximumScore

File

question_types/quiz_long_answer/src/Plugin/quiz/QuizQuestion/LongAnswerQuestion.php, line 127

Class

LongAnswerQuestion
@QuizQuestion ( id = "long_answer", label = Plugin annotation @Translation("Long answer question"), handlers = { "response" = "\Drupal\quiz_long_answer\Plugin\quiz\QuizQuestion\LongAnswerResponse" } )

Namespace

Drupal\quiz_long_answer\Plugin\quiz\QuizQuestion

Code

public function getMaximumScore() {
  return Drupal::config('quiz.settings.question.long_answer')
    ->get('default_max_score');
}