public function QuizResultAnswerEntityTrait::getFeedbackValues in Quiz 6.x
Same name and namespace in other branches
- 8.6 src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getFeedbackValues()
- 8.5 src/Entity/QuizResultAnswerEntityTrait.php \Drupal\quiz\Entity\QuizResultAnswerEntityTrait::getFeedbackValues()
5 methods override QuizResultAnswerEntityTrait::getFeedbackValues()
- LongAnswerResponse::getFeedbackValues in question_types/
quiz_long_answer/ src/ Plugin/ quiz/ QuizQuestion/ LongAnswerResponse.php - MatchingResponse::getFeedbackValues in question_types/
quiz_matching/ src/ Plugin/ quiz/ QuizQuestion/ MatchingResponse.php - Implementation of getFeedbackValues().
- MultichoiceResponse::getFeedbackValues in question_types/
quiz_multichoice/ src/ Plugin/ quiz/ QuizQuestion/ MultichoiceResponse.php - ShortAnswerResponse::getFeedbackValues in question_types/
quiz_short_answer/ src/ Plugin/ quiz/ QuizQuestion/ ShortAnswerResponse.php - TrueFalseResponse::getFeedbackValues in question_types/
quiz_truefalse/ src/ Plugin/ quiz/ QuizQuestion/ TrueFalseResponse.php
File
- src/
Entity/ QuizResultAnswerEntityTrait.php, line 126
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 getFeedbackValues() : array {
$data = [];
$data[] = [
'choice' => 'True',
'attempt' => 'Did the user choose this?',
'correct' => 'Was their answer correct?',
'score' => 'Points earned for this answer',
'answer_feedback' => 'Feedback specific to the answer',
'question_feedback' => 'General question feedback for any answer',
'solution' => 'Is this choice the correct solution?',
'quiz_feedback' => 'Quiz feedback at this time',
];
return $data;
}