Steps to reproduce:

In the current 5.x-dev...
1. Uncheck the quiz setting "Allow quiz creators to set a pass/fail option when creating a questionnaire" and save.
2. Go to admin/quiz/settings/quiz-form.
3. Try to save. Receive error in subject.

Cause:

In the event that checkbox is unchecked and saved, the pass/fail options are prevented from showing on the form, and so the submission errors out.

This appears to be another refactoring-related one, because we're sharing that form with the same form on the quiz creation form, and in THAT event, the pass/fail options are actually SUPPOSED to not be on the form.

Patch approach:

Unconditionally show the pass/fail options when in the settings form.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

captainack’s picture

I added the pass/fail options to the form, since the form description implies that users can't OVERRIDE default pass/fail options, not that there are no pass/fail options.

captainack’s picture

Status: Active » Needs review
captainack’s picture

Issue summary: View changes

Sorry for the bump. Updated issue summary to make it easier to read.

FYI, the most recent dev still spits this error out, which renders disabling the "Allow quiz creators to set a pass/fail option when creating a questionnaire" checkbox broken.

djdevin’s picture

Issue summary: View changes
FileSize
2.4 KB

The pass_rate field should really be nullable in the database, since it does not have to have a value - 0 is not the same as "does not have a passing rate".

Updated the schema definition and added an update hook.

I don't get the fatal now, on the configuration form or on the node itself.

Also fixed a few notices resulting from the pass result text not existing.

Status: Needs review » Needs work

The last submitted patch, 4: general_error_1364-2509232-4.patch, failed testing.

captainack’s picture

Good point. That's a cleaner and better approach.

djdevin’s picture

Status: Needs work » Needs review
FileSize
1.91 KB
djdevin’s picture

Status: Needs review » Fixed

Fixed.

  • djdevin committed 427119c on 7.x-5.x
    Issue #2509232 by djdevin, captainack: General error: 1364 Field '...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.