-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add option for limiting number of attempts in assessment mode to Studio editor #81
Conversation
Thanks for the pull request, @itsjeyd! 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=81 |
@itsjeyd The code works and looks good. The discovery document says to set the scope of the This PR adds two new strings (field label and help text) that should be added to |
@mtyaka Thanks for reviewing! Yes, I'm intentionally setting the scope of Good catch about the strings! AFAIK we don't have a separate process for extracting translations, so I just updated the Please have a look at the updates (the first commit is just a cosmetic change that doesn't alter any logic). |
@itsjeyd Thanks for the explanation and updates! 👍
|
@@ -492,6 +511,7 @@ function DragAndDropEditBlock(runtime, element, params) { | |||
var data = { | |||
'display_name': $element.find('#display-name').val(), | |||
'mode': $element.find("#problem-mode").val(), | |||
'max_attempts': $element.find("#max-attempts").val(), |
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 recommend that you use classes instead of ids-- it is a general best practice to avoid ids.
- Wrapp input field for max_attempts in label to be able to use classes instead of ids.
👍 Will there be end-to-end tests written once the LMS part of the functionality is complete? |
👍 Also wondering about @cahrens question. Although testing the UX is helpful, it would be good to test this with the backend functionality. |
Thanks @cahrens and @staubina! Yes, we'll add integration tests that verify behavior for problems with limited/unlimited attempts in upcoming tickets (when implementing functionality for submitting answers in assessment mode). @cptvitamin Would you like to have a quick look at this PR as well? |
@edx/edx-accessibility This PR is ready for you guys to have a look (repeating my earlier ping based on info about this new tag that was posted on the mailing list). |
+1 on the studio functionality. |
Thanks for the review, @sstack22! |
Merging this now. It's a small Studio-editor-only change, so I believe it is unlikely to have a11y concerns, but we now have a ticket, SOL-1978, for a final / follow-up a11y review of any assessment mode functionality that didn't get an a11y review before our deadlines. |
Description
This PR implements the following use case1:
1Note that learner-facing functionality related to limiting the number of available attempts will be covered by future PRs.
UX
For drag-and-drop problems in standard mode, the interactive Studio editor does not show an option for setting the maximum number of attempts.
For drag-and-drop problems in assessment mode, the interactive Studio editor shows a numeric input field that allows course authors to specify the maximum number of attempts. The field is hidden until a course author sets the mode of a drag-and-drop problem to "assessment mode" (as described above).
n
, course authors can indicate that learners may attempt the problem exactlyn
times.The value of the “Maximum attempts” setting defaults to “not set” (unlimited attempts).
Switching modes does not affect the current value of the “Maximum attempts” field.
JIRA tickets: SOL-1941
Discussions: The feature implemented in this PR was discussed with @marcotuts as part of his review of the discovery document for DnDv2 assessment mode.
Dependencies: None
Screenshots:
Standard mode:
Assessment mode:
Sandbox URL:
Studio: http://studio-dndv2-sandbox2.opencraft.hosting/
LMS: http://dndv2-sandbox2.opencraft.hosting/
The sandbox is currently using version 40037b1 of DnDv2.
Testing instructions:
To test from scratch (using sandbox or local development environment):
To test using existing DnDv2 instances, access
"PR Review Testing" > "Maximum attempts" > "Standard mode"
and/or
"PR Review Testing" > "Maximum attempts" > "Assessment mode"
units on the sandbox (they are part of the "Drag and Drop Demos" course) and perform relevant steps listed above.
Reviewers
Also tagging @pdesjardins as a docs FYI.