You are here

function quiz_node_map in Quiz 5

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_node_map()
  2. 5.2 quiz.module \quiz_node_map()
  3. 6.6 quiz.module \quiz_node_map()
  4. 6.2 quiz.module \quiz_node_map()
  5. 6.3 quiz.module \quiz_node_map()
  6. 6.4 quiz.module \quiz_node_map()
  7. 6.5 quiz.module \quiz_node_map()
  8. 7 quiz.module \quiz_node_map()
  9. 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;
}