Skip to content
Snippets Groups Projects
Commit b0e667ba authored by falcon's avatar falcon
Browse files

Removing code that has been commented out.

parent 82daa9db
No related branches found
No related tags found
No related merge requests found
......@@ -1172,32 +1172,6 @@ function quiz_take_quiz($quiz) {
elseif ($_POST['op'] == t('Submit') || $_POST['op'] == t('Next')) {
if (!isset($_SESSION['quiz_'. $quiz->nid]['result_id']))
$_SESSION['quiz_'. $quiz->nid]['result_id'] = quiz_create_rid($quiz);
/* We are re-introducing the old skip logic...
if (!isset($_POST['tries'])) {
// Moving skip logic here...
if ($allow_skipping) {
// Advance the question.
$_SESSION['quiz_'. $quiz->nid]['previous_quiz_questions'][] = $_SESSION['quiz_'. $quiz->nid]['quiz_questions'][0];
// Load the last asked question.
$former_question_array = array_shift($_SESSION['quiz_'. $quiz->nid]['quiz_questions']);
$former_question = node_load(array('nid' => $former_question_array['nid']));
// Call hook_skip_question().
$module = quiz_question_module_for_type($former_question->type);
$result = module_invoke($module, 'skip_question', $former_question, $_SESSION['quiz_'. $quiz->nid]['result_id']);
// Report that the question was skipped:
quiz_store_question_result($result, array('set_msg' => TRUE));
}
else {
drupal_set_message(t('You must select an answer before you can progress to the next question!'), 'error');
}
}
else {*/
//unset($_SESSION['quiz_'. $quiz->nid]['previous_quiz_questions']);
// Previous quiz questions: Questions that have been asked already. We save a record of all of them
// so that a user can navigate backward all the way to the beginning of the quiz.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment