diff --git a/question_types/quiz_question/quiz_question.module b/question_types/quiz_question/quiz_question.module index 4bcb5c6..b6f8fe2 100644 --- a/question_types/quiz_question/quiz_question.module +++ b/question_types/quiz_question/quiz_question.module @@ -178,7 +178,7 @@ function quiz_question_answering_form($form, $form_state, $node, $include_nid_in '#type' => 'submit', '#value' => $is_last ? t('Finish') : t('Next'), ); - + if ($is_last) { $form['#attributes']['class'][] = 'confirm'; $form['#attributes']['data-confirm-message'] = t('By proceeding you won\'t be able to go back and edit your answers'); @@ -516,12 +516,15 @@ function quiz_question_view($node, $view_mode) { } $content = ''; - if (_quiz_is_taking_context()) { + if (_quiz_is_taking_context() && empty($node->from_quiz_question_view)) { + $node->from_quiz_question_view = TRUE; /* * @todo: I see no reason why this should be a part of view anymore. * In quiz 5 we should stop using hook_view to view the answering form */ $form = drupal_get_form('quiz_question_answering_form', $node); + $render = node_view($node, 'teaser'); + $form['question']['#markup'] = drupal_render($render); $form_markup = drupal_render($form); if (!empty($form_markup)) {