function quiz_question_teaser_form in Quiz 6.6
Form for teaser display
1 string reference to 'quiz_question_teaser_form'
- quiz_question_view in question_types/
quiz_question/ quiz_question.module - Implementation of hook_view()
File
- question_types/
quiz_question/ quiz_question.module, line 283 - Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz. While you can create standard Quiz question types simply by implementing the appropriate hooks, this module provides a framework that makes…
Code
function quiz_question_teaser_form($context, $node) {
$form['question'] = array(
'#type' => 'markup',
'#value' => check_markup($node->body, $node->format, FALSE),
);
// reconstruct form so type is first (at top)
// TODO is there a better way? like unshift an assoc tuple?
$type = node_get_types('type', $node);
$newform['question_type'] = array(
'#type' => 'markup',
'#value' => '<div class="question_type_name">' . $type->name . '</div>',
);
$newform += $form;
$form = $newform;
return $form;
}