You are here

public function QuizAnswerInterface::getWeightedRatio in Quiz 6.x

Get the weighted score ratio.

This returns the ratio of the weighted score of this question versus the question score. For example, if the question is worth 10 points in the associated quiz, but it is a 3 point multichoice question, the weighted ratio is 3.33.

This is marked as final to make sure that no question overrides this and causes reporting issues.

Return value

float|int The weight of the question

File

src/QuizAnswerInterface.php, line 144

Class

QuizAnswerInterface
Provides an interface for quiz answers.

Namespace

Drupal\quiz

Code

public function getWeightedRatio();