public function QuizQuestionResponse::__construct in Quiz 6.3
Same name and namespace in other branches
- 6.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 6.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 6.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 7.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 7 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 7.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
- 7.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestionResponse::__construct()
Create a new user response.
Parameters
$rid: The result ID for the user's result set. There is one result ID per time the user takes a quiz.
$question: The question node.
$answer: The answer (dependent on question type).
5 methods override QuizQuestionResponse::__construct()
- LongAnswerResponse::__construct in question_types/
long_answer/ long_answer.classes.inc - Create a new user response.
- MatchingResponse::__construct in question_types/
matching/ matching.classes.inc - Create a new user response.
- QuizDirectionsResponse::__construct in question_types/
quiz_directions/ quiz_directions.classes.inc - Create a new user response.
- ShortAnswerResponse::__construct in question_types/
short_answer/ short_answer.classes.inc - Create a new user response.
- TrueFalseResponse::__construct in question_types/
quiz_question/ quiz_question.truefalse.inc - Create a new user response.
File
- question_types/
quiz_question/ quiz_question.core.inc, line 139 - 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 __construct($rid, $question, $answer = NULL);