You are here

public function QuizQuestionResponse::getFeedbackValues in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::getFeedbackValues()

Get the response part of the report form

Return value

Array of response data, with each item being an answer to a response. For an example, see MultichoiceResponse::getReportFormResponse(). The sub items are keyed by the feedback type. Providing a NULL option means that feedback will not be shown. Seen an example at LongAnswerResponse::getReportFormResponse().

1 call to QuizQuestionResponse::getFeedbackValues()
QuizQuestionResponse::getFeedback in question_types/quiz_question/quiz_question.core.inc
Returns a renderable array of question feedback.
6 methods override QuizQuestionResponse::getFeedbackValues()
LongAnswerResponse::getFeedbackValues in question_types/long_answer/long_answer.classes.inc
Implementation of getReportFormResponse
MatchingResponse::getFeedbackValues in question_types/matching/matching.classes.inc
Implementation of getReportFormResponse
MultichoiceResponse::getFeedbackValues in question_types/multichoice/multichoice.classes.inc
Implementation of getReportFormResponse
ScaleResponse::getFeedbackValues in question_types/scale/scale.classes.inc
Implmenets QuizQuestionResponse::getReportFormResponse().
ShortAnswerResponse::getFeedbackValues in question_types/short_answer/short_answer.classes.inc
Implementation of getReportFormResponse

... See full list

File

question_types/quiz_question/quiz_question.core.inc, line 775
Classes used in the Quiz Question module.

Class

QuizQuestionResponse
Each question type must store its own response data and be able to calculate a score for that data.

Code

public function getFeedbackValues() {
  $data = array();
  $data[] = array(
    '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;
}