function quiz_question_skip_question in Quiz 6.5
Same name and namespace in other branches
- 8.4 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
- 6.6 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
- 6.3 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
- 6.4 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
- 7 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
- 7.4 question_types/quiz_question/quiz_question.module \quiz_question_skip_question()
Implementation of quiz hook_skip_question().
File
- question_types/
quiz_question/ quiz_question.module, line 268 - 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_skip_question($question, $rid) {
unset($_POST['tries']);
// Unset any answer that might have been set.
// Delete any old answers for this question (for backwards nav).
_quiz_question_response_get_instance($rid, $question)
->delete();
// This is the standard response:
$response = new stdClass();
$response->nid = $question->nid;
$response->vid = $question->vid;
$response->rid = $rid;
$response->is_skipped = TRUE;
return $response;
}