Skip to content

refactor: use days_early_for_beta from InheritanceMixin instead of runtime [FC-0026] - #1977

Merged
pomegranited merged 2 commits into
openedx:masterfrom
open-craft:agrendalath/fc-0026-beta_testing_days
Jun 14, 2023
Merged

refactor: use days_early_for_beta from InheritanceMixin instead of runtime [FC-0026]#1977
pomegranited merged 2 commits into
openedx:masterfrom
open-craft:agrendalath/fc-0026-beta_testing_days

Conversation

@Agrendalath

@Agrendalath Agrendalath commented Jun 8, 2023

Copy link
Copy Markdown
Member

TL;DR - Use the block's property directly instead of getting it from the runtime.

What changed?

FC-0026 removes the block-specific handling from the runtime. In openedx/openedx-platform#32356, we are simplifying user checks. prepare_runtime_for_user adds the days_early_for_beta attribute to the runtime, but this value is already provided by the InheritanceMixin. We are removing this redundancy, so this makes ora2 retrieve the value directly from XBlock fields.

This also updates the PR template and the release process doc, as they were slightly outdated.

Developer Checklist

Testing Instructions

  1. Go to the Course Advanced Settings and set Days Early for Beta Users to 6000.
  2. Create an ORA2 XBlock. Go to Edit -> SCHEDULE and set its start dates to 2030.
  3. Go to the Instructor Dashboard -> Membership and enroll audit as a beta tester.
  4. Visit LMS as the audit user and check that you can submit the solution.

Supporting information

Private-ref: BB-7448

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

…hash

These files do not change their structure too often, so pointing directly to
the ones that contain the most recent version number makes more sense.
@Agrendalath
Agrendalath requested a review from a team June 8, 2023 18:54
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 8, 2023
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @Agrendalath! 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.

@codecov

codecov Bot commented Jun 8, 2023

Copy link
Copy Markdown

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (7912a81) 94.98% compared to head (f05e193) 94.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1977      +/-   ##
==========================================
- Coverage   94.98%   94.98%   -0.01%     
==========================================
  Files         154      154              
  Lines       17045    17044       -1     
  Branches     1611     1610       -1     
==========================================
- Hits        16190    16189       -1     
  Misses        641      641              
  Partials      214      214              
Flag Coverage Δ
unittests 94.98% <100.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
openassessment/xblock/test/test_staff.py 99.51% <ø> (ø)
openassessment/xblock/test/test_staff_area.py 99.85% <ø> (ø)
openassessment/__init__.py 100.00% <100.00%> (ø)
openassessment/xblock/openassessmentblock.py 90.68% <100.00%> (-0.05%) ⬇️
openassessment/xblock/test/test_openassessment.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Agrendalath

Copy link
Copy Markdown
Member Author

@0x29a, @bradenmacdonald, this is ready for review.

@pomegranited, would you like to review this as CC?

@bradenmacdonald

Copy link
Copy Markdown

Looks good from a quick look, but I'll let others do the bulk of the review here. I'm not a CC for this repo.

@pomegranited

Copy link
Copy Markdown
Contributor

@Agrendalath Sure thing, I'll review it this week.

@pomegranited pomegranited left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 Works great, thank you @Agrendalath !

I'll merge this tomorrow if there's no objections from anyone on #cc-core-applications.

  • I tested this on my devstack using the PR test instructions
  • I read through the code
  • I checked for accessibility issues N/A -- backend changes only
  • Includes documentation -- +💯 for updating the erroneous links in the .github templates!
  • Commit structure follows OEP-0051

@pomegranited
pomegranited merged commit 0f8b0f9 into openedx:master Jun 14, 2023
@openedx-webhooks

Copy link
Copy Markdown

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

@pomegranited
pomegranited deleted the agrendalath/fc-0026-beta_testing_days branch June 14, 2023 23:38
@pomegranited

pomegranited commented Jun 14, 2023

Copy link
Copy Markdown
Contributor

Merged and tagged: v5.0.3, and it's been pushed to pypi.

@leangseu-edx since you did the last one, do you know if the releases are created automatically, or do I need to draft one manually? Please disregard -- it's been a while since the release was tagged, so I went ahead and created it: https://github.com/openedx/edx-ora2/releases/tag/v5.0.3

@Agrendalath

Copy link
Copy Markdown
Member Author

Thank you, @pomegranited!

@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Jun 20, 2023
@Agrendalath Agrendalath self-assigned this Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants