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: cherry-pick edx-enterprise customizations to Palm [BB-7878] #10

Conversation

0x29a
Copy link
Member

@0x29a 0x29a commented Oct 27, 2023

Description

Nutmeg uses 3.42.5: https://github.com/openedx/edx-platform/blob/open-release/nutmeg.3/requirements/constraints.txt#L34

Diff between opencraft-release/nutmeg.2 and 3.42.5: https://github.com/openedx/edx-enterprise/compare/3.42.5...open-craft:edx-enterprise:opencraft-release/nutmeg.2?expand=1:

Commit Related PR Upstream PR Note
1be2ff9 #3 openedx#1714 Squashed into a single commit.
8c499ec #4 openedx#1748
cc0b2ad #5 openedx#1714 This was just an update of the first pull request. Not needed, since I cherry-picked the recent version.
bbafc5e #6 openedx#1788 Squashed into a single commit, extracted migrations.
65cee2c #7 openedx#1813 Squashed into a single commit, extracted migrations.
4e6e348 #8 None Replaced with 9840c0b.

Testing notes:

Testing this was extremely tedious, so I'm not providing exact steps that I performed to make the devstack and all enterprise-related services work together (I'll post them somewhere after I compile my notes). But, I successfully followed all testing steps for the following pull requests:

@0x29a 0x29a force-pushed the 0x29a/bb7878/cherry-pick-edx-enterprise-customizations-to-palm branch 7 times, most recently from 6ed0fe2 to e67d545 Compare October 30, 2023 17:55
0x29a and others added 7 commits October 30, 2023 19:00
Co-authored-by: Maxim Beder <maxim@opencraft.com>

test: EnterpriseCourseEnrollmentFilterBackend

Co-authored-by: Maxim Beder <maxim@opencraft.com>

feat: add additional fields to EnterpriseCourseEnrollmentViewSet

Created new manager and serializer for EnterpriseCourseEnrollment model,
which add additional fields to the model, which allow to reduce the
number of requests to the API by providing the necessary data in the
feilds along side the model.

Use the new manager and serializer in EnterpriseCourseEnrollmentViewSet.

Co-authored-by: Maxim Beder <maxim@opencraft.com>
When creating pending enrollments for non-existant users, we also check
to see if the course is "invite_only". If the course is invite only,
then we create corresponding CourseEnrollmentAllowed objects. This fixes
the issue when the enterprise creates pending enrollment, but the user
cannot enroll to the course as platform rejects the enrollment request
due to missing CEA for the user.

(cherry picked from commit 0e06d74)
This adds a new attribute `hide_course_price_when_zero` to the
EnterpriseCustomer model, which will hide the pricing information
from the enrollment page when the final price of a premium course
mode is Zero.

fix: removed unused variable from template context

fix: quality issue and add the new attribute to test

fix: update the help text in the db migration

feat: adds final price to logging

fix: change the attribute in the utils test causing test failure

refactor: renamed the migration file
temp: add utility function to add CEA objects

feat: adds allow invite only enrollment flag

feat: adds allow invite only enrollment flag

feat: create cea only when customer has invite-only enrollments enabled

fix: simplify the cea creation logic, update tests

fix: remove a stray empty line

feat: adds the invite-only flag to customer admin

fix: typo in the fuction docstring

Co-authored-by: Piotr Surowiec <piotr@surowiec.it>

refactor: convert the user consent flow handler method to static

fix: move migrations to avoid conflicts

feat: add typing to the ensure cea utility method

Revert "feat: add typing to the ensure cea utility method"

This reverts commit b6b2f25.

refactor: rename the migration with a custom name instead of the auto one
This commit contains renamed migrations that were extracted from other
pull requests. We do this because upstream PRs depend on migrations that
don't exist in v3.61.11

IMPORTANT: if you've previously had `opencraft-release/nutmeg.2`
installed, you'll have to fake all migrations from this commit, as
changes are mostly likely already applied to your DB.

See this and further comments for details: https://tasks.opencraft.com/browse/BB-7619?focusedCommentId=274168&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-274168
@0x29a 0x29a force-pushed the 0x29a/bb7878/cherry-pick-edx-enterprise-customizations-to-palm branch from e67d545 to fcd515b Compare October 30, 2023 18:01
@0x29a 0x29a changed the title feat: Cherry-pick edx-enteprise customizations to Palm [BB-7878][WIP] feat: cherry-pick edx-enteprise customizations to Palm [BB-7878][WIP] Oct 30, 2023
@0x29a 0x29a changed the title feat: cherry-pick edx-enteprise customizations to Palm [BB-7878][WIP] feat: cherry-pick edx-enteprise customizations to Palm [BB-7878] Oct 30, 2023
Copy link
Member

@Agrendalath Agrendalath left a comment

Choose a reason for hiding this comment

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

@0x29a, thank you for the very detailed description of all the changes! Great job.

👍

  • I tested this: checked that the diffs match the PRs (one nit: the codecov version bump was included in 762faa9 instead of 3534251, but it's not a big deal)
  • I read through the code
  • I checked for accessibility issues: n/a
  • Includes documentation: n/a
  • I made sure any change in configuration variables is reflected in the corresponding client's configuration-secure repository: I bumped the version; it will be included in the next deployment

@Agrendalath Agrendalath merged commit 55e5012 into opencraft-release/palm.1 Nov 7, 2023
8 checks passed
@Agrendalath Agrendalath deleted the 0x29a/bb7878/cherry-pick-edx-enterprise-customizations-to-palm branch November 7, 2023 17:50
@0x29a 0x29a changed the title feat: cherry-pick edx-enteprise customizations to Palm [BB-7878] feat: cherry-pick edx-enterprise customizations to Palm [BB-7878] Nov 9, 2023
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