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

fix: grace period validation and parsing #2222

Merged
merged 7 commits into from
Aug 23, 2024
Merged

Conversation

jansenk
Copy link
Contributor

@jansenk jansenk commented Aug 13, 2024

TL;DR - The resubmission grace period wasn't being correctly parsed from xml or correctly validated in studio.

JIRA: https://2u-internal.atlassian.net/browse/AU-2071

What changed?

  • xml parsing should default grace period to empty string rather than none
  • shouldn't be validating the grace period field when the feature is disabled

Developer Checklist

FYI: @openedx/content-aurora

@jansenk jansenk requested a review from a team as a code owner August 13, 2024 14:22
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.10%. Comparing base (3b29778) to head (b7a5acd).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2222   +/-   ##
=======================================
  Coverage   95.09%   95.10%           
=======================================
  Files         195      195           
  Lines       21485    21485           
  Branches     1931     1931           
=======================================
+ Hits        20431    20433    +2     
+ Misses        787      786    -1     
+ Partials      267      266    -1     
Flag Coverage Δ
unittests 95.10% <100.00%> (+<0.01%) ⬆️

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.

@pomegranited
Copy link
Contributor

Hi @jansenk , this change looks great, thank you for submitting it :)
I'm having issues with my devstack, but will do my best to get this tested and approved tomorrow or next week.

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.

👍 Thank you for fixing this issue so cleanly @jansenk , and for adding great tests.

  • I tested this on my devstack:
    • created a new ORA unit
    • played with enabling/disabling resubmissions and valid/invalid data in the grace period field
    • exported & re-imported the course with edited ORA2 OLX, to play with the above permutations.
    • checked that the UI still flags invalid values from the imported OLX and works as desired.
  • I read through the code
  • I checked for accessibility issues N/A
  • Includes documentation N/A
  • User-facing strings are extracted for translation N/A

@pomegranited pomegranited merged commit e61a216 into master Aug 23, 2024
11 checks passed
@pomegranited pomegranited deleted the jkantor/grace-period branch August 23, 2024 06:11
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.

Oh, I totally missed this. Thank you folks!

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