Posted by bangalos on May 10, 2010 at 11:53pm
Hello everyone,
I am trying to create a LIFELINE feature for the quiz. For starters, it will display live twitter feed related to current quiz topic. I am using Quiz 4 module. I have created a new question_type, that will allow adding extra fields and store additional fields information in a separate table.
I would like to grab the current quiz question text, perform a search and display its results in a block. Which variable / function should I call so that I get the text of current question? I already have the block that will perform a twitter search and display the answers (twitter_pull).
Regards,
Srikanth.

Comments
menu_get_object() is the answer
call
$result = menu_get_object()in your hook_block()$result->bodywill give you the question text.But menu_get_object is returning the quiz, not quiz-question.
Thanks Sivaji for the pointer. The menu_get_object function returned the quiz node information, not the quiz_question being taken. I am trying to update a module while quiz is being taken ... so */take pages have this Block enabled on them. $result->body content is always the same for all the questions - namely, the body for the quiz itself.
Is there a way to get the current quiz question in a separate module, without modifying the quiz.module file?
Thanks much,
Srikanth.
aha i misunderstood your
aha i misunderstood your question, please take a look
quiz_take_quiz()*, its the primary function responsible for handling quiz. It holds the current question info in session variable which you can access from other module.