Skip to content
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

feat: allow learner resubmissions in ora assignment #2187

Merged
merged 29 commits into from
May 10, 2024

Conversation

BryanttV
Copy link
Contributor

@BryanttV BryanttV commented Mar 5, 2024

Description

These changes are based on the following POC

This PR allows a learner to reset and make a new submission. Instructors will activate this functionality from the component settings, and can optionally define a grace period.

To allow a learner to reset their submission the following conditions must be met:

  1. The ORA activity was specifically configured to allow resubmissions.
  2. The responses schedule still allows new responses to be submitted.
  3. The ORA activity does not have a peer step.
  4. The current submission is not marked as "being graded" by any course staff member.

Supporting Information

These changes are part of the effort made to implement Resetting ORA submissions

What changed?

  1. Two (2) new fields were included in the ORA settings:

    • Allow Learner Resubmissions (Boolean)
    • Resubmission Grace Period (String)
  2. A new button (Reset submission) was included in the Your Response step.

  3. A new module allow_resubmission was included to validate if the learner is allowed to make a resubmission.

Developer Checklist

Testing Instructions

Using Tutor:

  1. In your environment install edx-ora2 with the changes in this branch.
  2. Create a component with an ORA assignment.
  3. You can see a new field in the component settings: Allow Learner Resubmissions. Set it to True
  4. Now, you can see a new field: Resubmission Grace Period. You can configure it optionally, or leave it as it is by default.
  5. As a learner, from LMS submit your response.
  6. Now, in Your Response step you can see a button to Reset the submission. Press the button.
  7. You can now resubmit your response.
ora-resubmissions-demo-v3.mp4

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @openedx/content-aurora

Deadline

This effort is part of the Spanish consortium project, so it'd be ideal to merge this before the end of the project.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Mar 5, 2024
@openedx-webhooks
Copy link

openedx-webhooks commented Mar 5, 2024

Thanks for the pull request, @BryanttV! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch 5 times, most recently from 8b475c8 to 0e2899a Compare March 5, 2024 20:15
Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 97.94872% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 95.09%. Comparing base (c2dc989) to head (da484f3).

Files Patch % Lines
openassessment/xblock/utils/xml.py 60.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2187      +/-   ##
==========================================
+ Coverage   95.06%   95.09%   +0.02%     
==========================================
  Files         193      195       +2     
  Lines       21285    21479     +194     
  Branches     1918     1931      +13     
==========================================
+ Hits        20235    20425     +190     
- Misses        785      787       +2     
- Partials      265      267       +2     
Flag Coverage Δ
unittests 95.09% <97.94%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch 6 times, most recently from 722345a to 12be208 Compare March 7, 2024 17:23
@BryanttV BryanttV marked this pull request as ready for review March 7, 2024 17:47
@BryanttV BryanttV requested a review from a team as a code owner March 7, 2024 17:47
Copy link
Member

@mariajgrimaldi mariajgrimaldi left a comment

Choose a reason for hiding this comment

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

I haven't tested this, so my review is incomplete, but I left some comments for you to review. Thank you!

openassessment/xblock/openassessmentblock.py Outdated Show resolved Hide resolved
openassessment/xblock/openassessmentblock.py Outdated Show resolved Hide resolved
openassessment/xblock/static/js/src/lms/oa_response.js Outdated Show resolved Hide resolved
openassessment/xblock/test/data/update_xblock.json Outdated Show resolved Hide resolved
openassessment/xblock/test/test_allow_resubmission.py Outdated Show resolved Hide resolved
openassessment/xblock/utils/allow_resubmission.py Outdated Show resolved Hide resolved
openassessment/xblock/utils/allow_resubmission.py Outdated Show resolved Hide resolved
@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch 4 times, most recently from 0078db8 to 25167c8 Compare March 8, 2024 17:50
@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch 2 times, most recently from c8c2dd9 to 3ef4d21 Compare March 8, 2024 20:09
@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch from f98e22e to 72546ec Compare May 9, 2024 13:57
@BryanttV BryanttV force-pushed the bav/allow-learner-resubmissions branch from 6a579e3 to 538ecaa Compare May 9, 2024 15:55
@BryanttV
Copy link
Contributor Author

BryanttV commented May 9, 2024

Hi @pomegranited, thank you very much for your review!. The tests are passing and I bumped the version. The PR is ready to merge.

Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

👍 Working perfectly, thank you @BryanttV !

  • I tested this on my tutor dev stack.
    • ensured option is not shown if peer step in workflow
    • as student: submitted and re-submitted works as expected within the grace period
    • as staff: started grading response, which disabled student resubmission
  • I read through the code
  • I checked for accessibility issues by using my keyboard only when navigating.
    ✖️ Was unable to use my keyboard to re-expand the "Complete" submission tab (unrelated to this change), but once that's visible, can reset the response with the keyboard.
  • Includes documentation for the new settings
  • User-facing strings are extracted for translation

@pomegranited pomegranited merged commit d822f57 into openedx:master May 10, 2024
11 checks passed
@openedx-webhooks
Copy link

@BryanttV 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U product review PR requires product review before merging
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants