public function MatchingResponse::__construct in Quiz 6.3
Same name and namespace in other branches
- 6.6 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 6.4 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 6.5 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 7.6 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 7 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 7.4 question_types/matching/matching.classes.inc \MatchingResponse::__construct()
- 7.5 question_types/matching/matching.classes.inc \MatchingResponse::__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).
Overrides QuizQuestionResponse::__construct
File
- question_types/
matching/ matching.classes.inc, line 219 - quiz_directions.classes
Class
- MatchingResponse
- Class that describes a "Directions question response". For the most part, no real scoring takes place for a direction node. However, there are a few behind-the-scenes tricks that are done here to make the quiz-taking process a little easier.
Code
public function __construct($rid, $question, $answer = NULL) {
$this->rid = $rid;
$this->question = $question;
$this->answer = $answer;
$this->is_correct = $this
->score();
}