function quiz_node_map in Quiz 6.2
Same name and namespace in other branches
- 8.4 quiz.module \quiz_node_map()
- 5.2 quiz.module \quiz_node_map()
- 5 quiz.module \quiz_node_map()
- 6.6 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_get_questions in ./
quiz.module - Retrieve list of published questions assigned to quiz.
- _quiz_get_unused_questions in ./
quiz.module - Retrieve list of published questions not assigned to quiz.
File
- ./
quiz.module, line 1149 - 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->vid = $node->vid;
$new_question->type = $node->type;
$new_question->status = isset($node->question_status) ? $node->question_status : QUESTION_NEVER;
return $new_question;
}