Skip to content

Conversation

@itsjeyd
Copy link
Member

@itsjeyd itsjeyd commented Oct 1, 2015

This PR fixes the following regression:

If the last question belonging to a mentoring block is an MCQ/MRQ and has no "Assessment Review" message component, it can't be submitted. The error happens only when trying to submit a wrong answer.

Testing

  1. Add Problem Builder block to unit.

  2. Temporarily enable mode switching by adding mode to editable_fields (mentoring.py, line 321):

    editable_fields = (
        'display_name', 'followed_by', 'max_attempts', 'enforce_dependency',
        'display_submit', 'feedback_label', 'weight', 'extended_feedback', 'mode'
    )

    This is necessary because mode switching was disabled in Step Builder: Add mentoring-level messages to review step and disable mode switching for Problem Builder #66 (as a first step towards deprecating assessment functionality of Problem Builder), and the bug only affects assessment mode.

  3. Set mode to "assessment".

  4. Add an MCQ, a Rating, and an MRQ to the block.

    • Make sure not to add review tips ("Message (Assessment Review)" blocks) to these questions.
    • Make sure to uncheck some "Accepted Choice[s]" for the rating questions so that you can submit an incorrect answer later.
  5. Complete block in the LMS, submitting an incorrect answer for each question. Observe that it is possible to submit answers and get to the next step without having to reload the page.

  6. Verify that there are no TypeErrors in the server logs.

@mtyaka
Copy link
Member

mtyaka commented Oct 1, 2015

Nice clean patch that fixes the problem for me 👍

itsjeyd added a commit that referenced this pull request Oct 1, 2015
Problem Builder: Fix submission of incorrect questions without review tips
@itsjeyd itsjeyd merged commit 3e8040b into master Oct 1, 2015
@xitij2000 xitij2000 deleted the fix-review-tips branch December 13, 2019 06:42
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