I can think of a few reasons why the new javascript confirm dialog was added (for example if user is on their last attempt is allowed) but for most users I think the modal dialog is much too intrusive.

http://drupalcode.org/project/quiz.git/commit/1e6ad16d27a30a2afdfd21f312...

Could we make it configurable? This could be either an explicit configuration item or it could be based on the number of attempts allowed. Don't display the confirmation dialog if you have more attempts left.

Thanks!

Comments

pandaPowder’s picture

Of course, if you want to get rid of it while waiting to see if this feature request will make it in (I didn't see the code in the 8.x version but I didn't look too hard) you can do what I did and kill this via hook_form_alter. I admit this is a bit heavy handed since it removes the confirm class from all quiz_question_answering_forms... I don't know that it's happening now, but I guess there could be other legitimate confirmation use cases where one would want a confirm perhaps not on the last question, but this worked for me for now.:

<?php
/**
 * implements hook_form_alter
 */
function YOUR_MODULE_form_alter(&$form, &$form_state, $form_id)
{
	if($form_id === "quiz_question_answering_form")
	{
		//Don't confirm on the last question
		$form['#attributes']['class'] = array_diff($form['#attributes']['class'], array('confirm'));
	}
}
?>
bobojo’s picture

Wow, no one had anything to say about this one? That's a bit concerning.

I just wanted to throw in my two cents and make a note that you can use hook_form_FORM_ID_alter() if you want to make things a little cleaner:

/**
 * Implements hook_form_FORM_ID_alter()
 */
function YOUR_MODULE_form_quiz_question_answering_form_alter(&$form, &$form_state) {
  // Don't confirm on the last question
  $form['#attributes']['class'] = array_diff($form['#attributes']['class'], array('confirm'));
}
djdevin’s picture

Status: Active » Closed (outdated)

This issue is being closed because it was filed against a Beta version of Quiz 4 that is no longer supported.

Quiz 4 is now in RC status.

If the issue still persists in the latest RC of Quiz 4, please open a new issue.