public function QuizResultAnswerEntityTrait::getQuizQuestion in Quiz 6.x
Same name and namespace in other branches
- 8.6 src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getQuizQuestion()
- 8.5 src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getQuizQuestion()
2 calls to QuizResultAnswerEntityTrait::getQuizQuestion()
- ShortAnswerResponse::score in question_types/
quiz_short_answer/ src/ Plugin/ quiz/ QuizQuestion/ ShortAnswerResponse.php - Calculate the unscaled score in points for this question response.
- TrueFalseResponse::score in question_types/
quiz_truefalse/ src/ Plugin/ quiz/ QuizQuestion/ TrueFalseResponse.php - Calculate the unscaled score in points for this question response.
File
- src/
Entity/ QuizResultAnswerEntityTrait.php, line 23
Class
- QuizResultAnswerEntityTrait
- Each question type must store its own response data and be able to calculate a score for that data.
Namespace
Drupal\quiz\EntityCode
public function getQuizQuestion() : QuizQuestion {
return Drupal::entityTypeManager()
->getStorage('quiz_question')
->loadRevision($this
->get('question_vid')
->getString());
}