Skip to content

Refactor site course enrollment filtering. - #16179

Merged
robrap merged 1 commit into
masterfrom
robrap/refactor-site-enrollment-filter
Oct 11, 2017
Merged

Refactor site course enrollment filtering.#16179
robrap merged 1 commit into
masterfrom
robrap/refactor-site-enrollment-filter

Conversation

@robrap

@robrap robrap commented Oct 5, 2017

Copy link
Copy Markdown
Contributor

No description provided.

@robrap

robrap commented Oct 5, 2017

Copy link
Copy Markdown
Contributor Author

jenkins run python

@robrap
robrap force-pushed the robrap/refactor-site-enrollment-filter branch 2 times, most recently from 7a94e14 to f713f20 Compare October 11, 2017 16:19
@robrap
robrap force-pushed the robrap/refactor-site-enrollment-filter branch from f713f20 to 112938e Compare October 11, 2017 16:22
# enrollments, because it could have been a data push snafu.
course_enrollments = list(get_course_enrollments(user, course_org_filter, org_filter_out_set))
# get the org whitelist or the org blacklist for the current site
site_org_whitelist, site_org_blacklist = get_org_black_and_whitelist_for_site(user)

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.

@douglashall: I decided to try to fix this code that I had written a while back to not lose it.

I don't know if this rename is a good idea, because the names course_org_filter and org_filter_out_set are used elsewhere.

The options are:

  1. Leave the code as it was.
  2. Go with this new code with renames. (I'm game.)
  3. Do a version of this PR with refactor and updated comments, but without renaming these variables. (I'm sort of game, but I need to move on.)
  4. Change to the new names everywhere. (I'm not game.) :)

Let me know what you think. Thanks.

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.

I would go with #2. I think this is a great refactor which makes this code much clearer for the reader. I wouldn't expect you to have to boil the ocean to make a substantive improvement like this.

@robrap
robrap merged commit 344e13b into master Oct 11, 2017
@robrap
robrap deleted the robrap/refactor-site-enrollment-filter branch October 11, 2017 18:10
@robrap

robrap commented Oct 11, 2017

Copy link
Copy Markdown
Contributor Author

Thanks @douglashall.
FYI: @andy-armstrong: I finally landed this refactor. :)

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Friday, October 13, 2017.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

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