Skip to content

Conversation

@mtyaka
Copy link
Member

@mtyaka mtyaka commented Mar 23, 2016

cf. MKCIN-3890

Test Instructions

  1. Create a new subunit containing one problem builder freeform question unit, and another arbitrary unit.
  2. Enable pb_hide_feedback_if_attempts_remain in your XBLOCK_SETTINGS.
  3. Go to the unit with the freeform question, fill it in, and submit.
  4. Go to the next unit, then come back to the unit with the freeform question.
  5. Feedback should be hidden, but the submit button should be enabled

This PR also contains a patch that makes MRQ behavior when pb_mcq_hide_previous_answer option is enable more consistent with the way MCQs behave. To test:

  1. Create a new subunit containing one problem builder MRQ question unit, and another arbitrary unit.
  2. Enable pb_mcq_hide_previous_answer in your XBLOCK_SETTINGS.
  3. Go to the unit with the MCQ question, fill it in, and submit.
  4. Go to the next unit, then come back to the unit with the MCQ question.
  5. Feedback should be hidden, checkmarks next to the choices should NOT be visible, and previously selected choices should not be selected.

When the pb_mcq_hide_previous_answer is set to True, MRQs should behave
the same way as MCQs behave - previous choices should not be displayed
and the checkmarks should be hidden.
@mtyaka mtyaka changed the title WIP: Enable freeform answer submit when feedback is hidden Enable freeform answer submit when feedback is hidden Mar 24, 2016
@property
def hide_feedback(self):
return self.get_option("pb_hide_feedback_if_attempts_remain") and not self.max_attempts_reached

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtyaka I like this refactoring :)


// Data may have change, we have to re-validate.
validateXBlock();

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtyaka changechanged. Also, is this still necessary now that answer blocks are handling validation themselves?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@itsjeyd I fixed the typo, thanks for noticing. This probably isn't necessary for answer blocks anymore (although it shouldn't do any harm), but I believe it still makes sense for other blocks.

@itsjeyd
Copy link
Member

itsjeyd commented Mar 25, 2016

👍 once newest comment is addressed and build is green.

When problem builder is configured to hide feedback upon revisiting a question
(pb_hide_feedback_if_attempts_remain option is enabled), when the user returns
to a problem builder block which contains only a freeform question,
the user is not able to click "Submit" without changing the answer text first.

This patch fixes that by keeping submit button enabled if
pb_hide_feedback_if_attempts_remain is turned on.

MCKIN-3890
@mtyaka mtyaka merged commit ff61a46 into master Mar 25, 2016
@mtyaka mtyaka deleted the freetext-submit branch March 25, 2016 16:13
@mtyaka
Copy link
Member Author

mtyaka commented Mar 25, 2016

Thanks @itsjeyd!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants