{"action":"created","issue":{"url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/101","repository_url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2","labels_url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/101/comments","events_url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/101/events","html_url":"https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101","id":176343901,"number":101,"title":"[SOL-1998] Implement Show Answer button","user":{"login":"itsjeyd","id":961441,"avatar_url":"https://avatars.githubusercontent.com/u/961441?v=3","gravatar_id":"","url":"https://api.github.com/users/itsjeyd","html_url":"https://github.com/itsjeyd","followers_url":"https://api.github.com/users/itsjeyd/followers","following_url":"https://api.github.com/users/itsjeyd/following{/other_user}","gists_url":"https://api.github.com/users/itsjeyd/gists{/gist_id}","starred_url":"https://api.github.com/users/itsjeyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/itsjeyd/subscriptions","organizations_url":"https://api.github.com/users/itsjeyd/orgs","repos_url":"https://api.github.com/users/itsjeyd/repos","events_url":"https://api.github.com/users/itsjeyd/events{/privacy}","received_events_url":"https://api.github.com/users/itsjeyd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2016-09-12T10:35:05Z","updated_at":"2016-09-19T23:56:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/pulls/101","html_url":"https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101","diff_url":"https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101.diff","patch_url":"https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101.patch"},"body":"## Description\r\n\r\nIn assessment mode, when the learner has run out of attempts, enable a \"Show Answer\" button. Clicking it causes all items to move to a correct placement.\r\n\r\n## Author\r\n\r\n@arbrandes\r\n\r\nOpenCraft review via https://github.com/open-craft/xblock-drag-and-drop-v2/pull/10.\r\n\r\n## Dependencies\r\n\r\n*None*\r\n\r\n## JIRA\r\n\r\n- [SOL-1998](https://openedx.atlassian.net/browse/SOL-1998)\r\n\r\n## Sandbox URLs\r\n\r\n- [Assessment mode](http://dndv2-sol-1998.opencraft.hosting/courses/course-v1:test+tt101+run/courseware/chapter/drag_and_drop_v2/): a DnDv2 instance in assessment mode, with one maximum attempt.\r\n- [Standard mode](http://dndv2-sol-1998.opencraft.hosting/courses/course-v1:test+tt101+run/courseware/chapter/drag_and_drop_v2_standard/): a DnDv2 instance in standard mode.\r\n\r\n## Latest commit\r\n\r\n- https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101/commits/adcbf1c83c6157477d72cbcf92258a8b1a16aefe *(updated 2016-09-17)*\r\n\r\n## Testing instructions\r\n\r\n### Assessment mode\r\n\r\n1. Go to the [assessment mode DnDv2 instance](http://dndv2-sol-1998.opencraft.hosting/courses/course-v1:test+tt101+run/courseware/chapter/drag_and_drop_v2/) on the LMS, and log in as `staff@example.com`.\r\n2. Click on `Staff Debug Info`, `Delete Student State`, and refresh the page.\r\n3. Notice that there is a \"Show Answer\" button, because this is in assessment mode.\r\n4. Notice that the \"Show Answer\" button is disabled, because this is your first attempt.  \r\n5. Pick any item and drop it onto any zone.\r\n6. Click submit, which will make you run out of attempts (there's only one).\r\n7. Notice that the \"Show Answer\" button is now enabled.\r\n8. Click the \"Show Answer\" button. Observe that:\r\n   * All items are placed correctly\r\n   * Decoy items are still in the bank.\r\n   * You can't drag any of the items.\r\n   * The \"Show Answer\" button is disabled.\r\n9. Refresh the page, and see that your final attempt is displayed. **Note**: This currently only works if you did not misplace any items; a decoy item that was placed on the board counts as a misplaced item. See \"Notes\" below for more info.\r\n10. Click \"Show Answer\" again. The same thing should happen again.\r\n\r\n### Standard mode\r\n\r\n1. Go to the [standard mode DnDv2 instance](http://dndv2-sol-1998.opencraft.hosting/courses/course-v1:test+tt101+run/courseware/chapter/drag_and_drop_v2_standard/) on the LMS, and log in as `staff@example.com`.\r\n2. Notice that there is no \"Show Answer\" button, because this is in standard mode.\r\n\r\n## Notes\r\n\r\nThere is an existing issue (present on master) that causes misplaced items to return to the item bank when refreshing the page after submitting the last remaining attempt for a DnDv2 problem. This PR does not include a fix for this issue. As a result, refreshing the page as described in step 9 above only produces expected results if items that were placed on the board in the final attempt are located in correct zones.\r\n\r\n## Reviewers\r\n\r\n- [x] OpenCraft: @itsjeyd\r\n- [ ] TNL: @cahrens and/or @staubina\r\n- [ ] a11y: To be completed as part of [SOL-1978](https://openedx.atlassian.net/browse/SOL-1978)\r\n- [ ] Product: @sstack22\r\n\r\nAlso tagging @pdesjardins as a docs FYI."},"comment":{"url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/comments/248163466","html_url":"https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101#issuecomment-248163466","issue_url":"https://api.github.com/repos/edx-solutions/xblock-drag-and-drop-v2/issues/101","id":248163466,"user":{"login":"arbrandes","id":759355,"avatar_url":"https://avatars.githubusercontent.com/u/759355?v=3","gravatar_id":"","url":"https://api.github.com/users/arbrandes","html_url":"https://github.com/arbrandes","followers_url":"https://api.github.com/users/arbrandes/followers","following_url":"https://api.github.com/users/arbrandes/following{/other_user}","gists_url":"https://api.github.com/users/arbrandes/gists{/gist_id}","starred_url":"https://api.github.com/users/arbrandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arbrandes/subscriptions","organizations_url":"https://api.github.com/users/arbrandes/orgs","repos_url":"https://api.github.com/users/arbrandes/repos","events_url":"https://api.github.com/users/arbrandes/events{/privacy}","received_events_url":"https://api.github.com/users/arbrandes/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T23:56:14Z","updated_at":"2016-09-19T23:56:14Z","body":"@staubina, thanks for the review!  Regarding the persistence of feedback when clicking Show Answer, as far as I know it should not happen.  Plus, it's a trivial fix, so I'm including it in my next push.\r\n\r\n@cahrens, thanks as well.  The keyboard focus currently doesn't leave the Show Answer button after pressing it.  I asked [above](https://github.com/edx-solutions/xblock-drag-and-drop-v2/pull/101#issuecomment-247810224) whether I should move it to the item bank.  What do you think?"}}
{"actor":{"display_login":"arbrandes"}}