How to get the current question's NID? When taking a quiz with multiple questions, how do I get the current question's NID? The URL only contains the quiz' NID (node/1234), even when I started the quiz there only this NID is available (node/1234/take/1). When I node_load(arg(1)) there also is no clue of how and what questions are mapped to a quiz.

quiz-7.x-5.0-alpha10
Thanks a lot @J.Reynolds for pointing me in the right direction!

/**
 * Helper function to get current question's NID.
 * @return string node ID
 */
function _current_question_nid() {

  // Presume a URL node/1234/take/2 meaning we are at the second question
  // of a quiz, where arg(1) is the quiz NID

  // Now let's look inside SESSION. There's our current quiz NID.
  if (array_key_exists(arg(1), $_SESSION['quiz'])) {

    // Inside there is the current result ID.
    $result_id = $_SESSION['quiz'][arg(1)]['result_id'];

  } else {

    // A little bit different to get the current result ID at last question.
    $result_id = $_SESSION['quiz']['temp']['result_id'];

  }

  // Now we can load the quiz results from that result ID.
  $result = quiz_result_load($result_id);
  // There all question NIDs are inside, nicely ordered, yay!

  // Finally let's take the question number and get its NID.
  $current = $result-&gt;layout[arg(3)];
  return $question_nid = $current['nid'];
}