You are here

public function ShortAnswerQuestion::getMaximumScore in Quiz 6.x

Same name and namespace in other branches
  1. 8.6 question_types/quiz_short_answer/src/Plugin/quiz/QuizQuestion/ShortAnswerQuestion.php \Drupal\quiz_short_answer\Plugin\quiz\QuizQuestion\ShortAnswerQuestion::getMaximumScore()
  2. 8.5 question_types/quiz_short_answer/src/Plugin/quiz/QuizQuestion/ShortAnswerQuestion.php \Drupal\quiz_short_answer\Plugin\quiz\QuizQuestion\ShortAnswerQuestion::getMaximumScore()

Get the maximum possible score for this question.

Return value

int

Overrides QuizQuestionInterface::getMaximumScore

File

question_types/quiz_short_answer/src/Plugin/quiz/QuizQuestion/ShortAnswerQuestion.php, line 99

Class

ShortAnswerQuestion
@QuizQuestion ( id = "short_answer", label = Plugin annotation @Translation("Short answer question"), handlers = { "response" = "\Drupal\quiz_short_answer\Plugin\quiz\QuizQuestion\ShortAnswerResponse" } )

Namespace

Drupal\quiz_short_answer\Plugin\quiz\QuizQuestion

Code

public function getMaximumScore() : int {
  return Drupal::config('quiz_short_answer.settings')
    ->get('default_max_score');
}