You are here

function quiz_question_goto in Quiz 7.6

Same name and namespace in other branches
  1. 7.5 question_types/quiz_question/quiz_question.module \quiz_question_goto()

Update the session for this quiz to the active question.

Parameters

type $quiz: A Quiz node.

type $question_number: Question number starting at 1.

5 calls to quiz_question_goto()
quiz_jumper_form_submit in ./quiz.module
quiz_question_answering_form_submit in question_types/quiz_question/quiz_question.module
Submit handler for the question answering form.
quiz_question_answering_form_submit_back in question_types/quiz_question/quiz_question.module
Submit handler for "back".
quiz_question_answering_form_submit_blank in question_types/quiz_question/quiz_question.module
Submit action for "leave blank".
quiz_take_question in ./quiz.module
Take a quiz questions.

File

question_types/quiz_question/quiz_question.module, line 316
Quiz Question module. This module provides the basic facilities for adding quiz question types to a quiz.

Code

function quiz_question_goto($quiz, $question_number) {
  $_SESSION['quiz'][$quiz->nid]['current'] = $question_number;
}