function quiz_node_map in Quiz 5
Same name and namespace in other branches
- 8.4 quiz.module \quiz_node_map()
- 5.2 quiz.module \quiz_node_map()
- 6.6 quiz.module \quiz_node_map()
- 6.2 quiz.module \quiz_node_map()
- 6.3 quiz.module \quiz_node_map()
- 6.4 quiz.module \quiz_node_map()
- 6.5 quiz.module \quiz_node_map()
- 7 quiz.module \quiz_node_map()
- 7.4 quiz.module \quiz_node_map()
Map node properties to a question object
Parameters
$node: Node
Return value
Question object
2 calls to quiz_node_map()
- quiz_questions_form in ./
quiz.module - Handles "Manage questions" tab
- _quiz_get_questions in ./
quiz.module - Retrieve list of questions assigned to quiz
File
- ./
quiz.module, line 1230 - Quiz Module
Code
function quiz_node_map($node) {
$new_question = new stdClass();
$new_question->question = check_markup($node->body, $node->format);
$new_question->nid = $node->nid;
$new_question->type = $node->type;
$new_question->status = isset($node->question_status) ? $node->question_status : 2;
return $new_question;
}