Skip to content

Commit 91cb79c

Browse files
devindjdevin
devin
authored andcommitted
Issue #1659400 by michaelk, djdevin: Hitting "Enter" goes to previous question
1 parent 8c5b25f commit 91cb79c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

question_types/quiz_question/quiz_question.module

+7
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,13 @@ function quiz_question_answering_form($form, $form_state, $nodes, $result_id) {
212212
$form['navigation']['#type'] = 'actions';
213213
$form['navigation']['#theme'] = 'quiz_question_navigation_form';
214214

215+
$form['navigation']['submit_hidden'] = array(
216+
'#weight' => -9999,
217+
'#type' => 'submit',
218+
'#value' => $is_last ? t('Finish') : t('Next'),
219+
'#attributes' => array('style' => 'display: none'),
220+
);
221+
215222
if (!empty($quiz->backwards_navigation) && ($_SESSION['quiz'][$quiz->nid]['current'] != 1)) {
216223
// Backwards navigation enabled, and we are looking at not the first
217224
// question. @todo detect when on the first page.

0 commit comments

Comments
 (0)