-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Click handlers and backend processing for assessment mode #87
Click handlers and backend processing for assessment mode #87
Conversation
Thanks for the pull request, @e-kolpakov! It looks like you're a member of a company that does contract work for edX. If you're doing this work as part of a paid contract with edX, you should talk to edX about who will review this pull request. If this work is not part of a paid contract with edX, then you should ensure that there is an OSPR issue to track this work in JIRA, so that we don't lose track of your pull request. To automatically create an OSPR issue for this pull request, just visit this link: https://openedx-webhooks.herokuapp.com/github/process_pr?repo=edx-solutions%2Fxblock-drag-and-drop-v2&number=87 |
@@ -412,12 +382,120 @@ def default_background_image_url(self): | |||
""" The URL to the default background image, shown when no custom background is used """ | |||
return self.runtime.local_resource_url(self, "public/img/triangle.png") | |||
|
|||
@property | |||
def attemps_remain(self): | |||
return self.max_attempts is None or self.num_attempts < self.max_attempts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to allow both None
(empty) and 0
values of max_attempts
to mean "unlimited attempts". It would be consistent with some other problem types where 0
means no limit.
ed8ad0d
to
3733581
Compare
feedback_msgs.append(_('Misplaced items were returned to item bank.')) | ||
else: | ||
|
||
if not misplaced_ids and not missing_ids: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to suggest to replace this with if self._is_finished()
to make it clearer, but then I realized that _is_finished()
is currently a bit broken in assessment mode, because it does not check decoy items. _is_finished()
should only return true if all non-decoy items are in their correct positions and all decoy items are in the bank.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mtyaka the problem is slightly deeper, so I've submitted https://tasks.opencraft.com/browse/OC-1829. Won't fix this as part of this PR due to very tight deadline on this one.
@e-kolpakov I noticed a problem when refreshing the page after you've dragged some items to the board. The items that are in correct positions are disabled (faded out) - they shouldn't be. Also I think it would be good if users were required to do some changes before they are allowed to submit the problem again. Currently you can keep clicking the submit button and it will keep submitting the identical solution. I think in some other problem types (such as problem builder MRQs) we require the user to change their answer before they can submit again. Edit: I just checked standard CAPA checkbox problem, and it does let you submit the same answer over and over again, so perhaps we don't have to worry about that. |
991c3d5
to
811f5a1
Compare
@mtyaka addressed review notes, please review |
|
||
class FeedbackMessages(object): | ||
FINAL_ATTEMPT_TPL = _('Final attempt was used, final score is {score}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@e-kolpakov These strings will get translated too early, see: http://edx.readthedocs.io/projects/edx-developer-guide/en/latest/conventions/internationalization/i18n.html#translating-too-early
One possible way around that would be to change these constants to functions (ie. FeedbackMessages.final_attempt(score)
, FeedbackMessages.correctly_placed(correct_count)
, etc).
@e-kolpakov This problem mentioned above is still present:
|
""" | ||
All items are at their correct place and a value has been | ||
submitted for each item that expects a value. | ||
Checks answer correctness: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as last comment on docstrings
The feedback area looks better-- thank you. At some point, it would be good to sync up with the feedback style being developed for capa (see https://github.com/edx/edx-platform/pull/13149 and https://openedx.atlassian.net/browse/TNL-4881, and take care to look at the most recent screenshots). I also wonder about focus not going to the feedback area, but see that you have an aria-live region on the feedback section. So I think it's fine to wait and see what the a11y review produces. I'm going to review the code now. |
@@ -127,7 +143,7 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin): | |||
default={}, | |||
) | |||
|
|||
num_attempts = Integer( | |||
attempts = Integer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has never been released previously, correct? Just want to make sure there is no data migration issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cahrens As far as I can tell - no, it has never been released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct - this field was introduced in the previous PR, #86, and has never been released.
We've had that discussion already - I've got an impression the idea was to wait on a11y to weigh in on this, so I haven't modified this in this PR (despite that line being marked as changed - I've just rearranged the code around it) |
|
||
self._publish_item_dropped_event(item_attempt, is_correct) | ||
|
||
return {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this method return an empty dict, while _drop_item_standard returns the correct and feedback data? They are both called by drop_item- what is the contract for what that method should return?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cahrens In standard mode, when item is dropped into a zone, learner get feedback (both per-item and overall) immediately.
In assessment mode, when an item is dropped into a zone, learner get no feedback at all. Instead feedback is displayed after an attempt is submitted, which is handled by do_attempt
.
I am done reviewing. I have a couple suggestions above, but nothing that I would consider blocking (for the purposes of getting something out that MIT can start working with). But in addition to the a11y review that will be done next week, there also needs to be a ticket for UX review and testing/bug-fixing of RTL mode-- please include a link to that ticket. With those caveats, 👍 |
5269326
to
a00309d
Compare
@cahrens created https://openedx.atlassian.net/browse/SOL-2030 for UX follow up. I've logged a ticket in Opnecraft internal tracker for RTL fixes, I just want acceptance criteria and wording to be reviewed and/or polished by @bradenmacdonald first. |
@sstack22 I believe this PR just waits for your approval now - could you please review it today (no pressure, but we're significantly overdue here) and ping me so I could push it forward? Thank you! |
a00309d
to
a134bc9
Compare
a134bc9
to
a0028a7
Compare
@bradenmacdonald, for documentation planning, is it possible that this will merge into production in this week's release (August 15th)? |
@pdesjardins Looks like Braden is not available yet, so I'll try to answer to the best of my knowledge. As far as I know, the plan is to include this changeset into today's release. This could happen if @sstack22 approves the PR today; today = 3-4 hours from now for me, and probably something like 8-10 hours for Braden (obviously, he knows better). If it happens, we'll merge this PR and push a version bump to release candidate branch. |
@e-kolpakov, @bradenmacdonald - 👍 on my end. This is great work! I'll comment on the follow-up UX ticket to iron out those future adjustments. |
@sstack22 Thank you - merging! |
Description: This PR actually implements submitting attempts for Assessment Mode. As of this PR, the minimum viable product implementation of Assessment Mode in Drag and Drop v2 is complete.
Dependencies: #86 (now merged)
JIRA: Part of SOL-1944
Discussions: Discovery document for DnDv2 assessment mode (relevant section: 2.2.3)
Sandbox URLs:
Updated 2016-08-12 to commit 5b837e7
Testing instructions:
6.1. Submit button shows spinner until AJAX request is sent
6.2. When AJAX is completed, incorrect items are returned to item bank, other items stay where they were.
6.3. Feedback message is updated to contain info about correctly placed items, misplaced items and items that should be put, but was not. If there were any misplaced items, feedback should also contain note about them being returned to item bank. If "initial" overall feedback is specified, it should be shown as well.
6.4. Attempts info should increase the number of used attempts.
8.1. Same as 6.1. - spinner
8.2. All items stay where they were (misplaced are not returned to bank, as opposed to 6.2)
8.3. All of 6.3 + note about using final attempt and final grade are shown.
8.4. Attempts info should read "Used N of N attempts".
8.5. Submit and Reset buttons are permanently disabled.
Reviewers