Skip to content

Support auto membership by MembershipRule - #15

Merged
OmarIthawi merged 1 commit into
masterfrom
omar/automatic
Feb 18, 2020
Merged

Support auto membership by MembershipRule#15
OmarIthawi merged 1 commit into
masterfrom
omar/automatic

Conversation

@OmarIthawi

@OmarIthawi OmarIthawi commented Feb 15, 2020

Copy link
Copy Markdown
Contributor

Requires the USER_ACCOUNT_ACTIVATED signal (appsembler/edx-platform#527) to work with Open edX well.

Jira: RED-707: Automatic domain-name-based enrollment for Course Access Groups

Notes:

@OmarIthawi
OmarIthawi force-pushed the omar/oe-plugin branch 2 times, most recently from 61f961b to 1f64f7d Compare February 15, 2020 23:51
@OmarIthawi
OmarIthawi force-pushed the omar/automatic branch 2 times, most recently from 0bb226e to cf61a68 Compare February 15, 2020 23:57
@OmarIthawi
OmarIthawi changed the base branch from omar/oe-plugin to master February 15, 2020 23:57
@OmarIthawi
OmarIthawi force-pushed the omar/automatic branch 2 times, most recently from 6acd225 to b4eabe8 Compare February 16, 2020 10:39
Comment thread course_access_groups/models.py Outdated
Comment thread course_access_groups/models.py Outdated
Comment thread course_access_groups/models.py Outdated
group = models.ForeignKey(CourseAccessGroup, on_delete=models.CASCADE)

@classmethod
def apply_for_user(cls, user):

@johnbaldwin johnbaldwin Feb 16, 2020

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This class method looks like it fits a grey area between being a model method in Membership or in MembershipRule or a model manager method. One could justify that since this is retrieving or creating a Membership instance, it should be in Membership or MembershipManager instead of MembershipRule

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was 50/50 for me, and I chose MembershipRule. Now moved to Membership. Thanks John for breaking the tie.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks Omar!

@johnbaldwin

Copy link
Copy Markdown

@OmarIthawi I started reviewing, about halfway through

@OmarIthawi
OmarIthawi force-pushed the omar/automatic branch 2 times, most recently from 1fdf76a to d3312ed Compare February 16, 2020 14:24

@johnbaldwin johnbaldwin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, great work @OmarIthawi !

@OmarIthawi
OmarIthawi merged commit 67a9e27 into master Feb 18, 2020
@OmarIthawi
OmarIthawi deleted the omar/automatic branch February 18, 2020 08:12
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.

2 participants