Fix mutlipe bugs when integrating with Open edX - #42
Merged
Conversation
OmarIthawi
force-pushed
the
omar/bug-fixes
branch
from
March 17, 2020 08:05
5421a6f to
97fc4e9
Compare
OmarIthawi
requested review from
grozdanowski,
johnbaldwin,
melvinsoft and
thraxil
March 17, 2020 11:59
OmarIthawi
marked this pull request as ready for review
March 17, 2020 11:59
thraxil
approved these changes
Mar 17, 2020
…_has_access So it works with both course like objects: CourseOverview (mysql) and CourseDescriptorWithMixins (mongo).
Otherwise 500 errors would happen in the `/courses` page when using the CAG feature with AnonymousUser.
Otherwise 500 errors would happen when using the CAG feature with AnonymousUser.
My bad. I assumed that `has_access` returns native `True`/`False` but it turns out it returns an `AccessResponse()` object.
Because disabling `ORGANIZATIONS_APP` in either `lms.env.json` or `cms.env.json` would makes CAG non-functional.
Because Django admin by default cannot deal with CourseKey.
After account activation, the automatic Membership objects were not created.
OmarIthawi
force-pushed
the
omar/bug-fixes
branch
from
March 18, 2020 08:28
4ac9e56 to
84aec1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
I installed the course access groups app into devstack with the steps below and found a couple of bugs. I fixed those bugs and tested the CAG app and saw it working properly after the fix.
Steps to Install CAG
Set
FEATURES["ORGANIZATIONS_APP"] = truein bothlms.env.jsonandcms.env.json.Set
"ENABLE_COURSE_ACCESS_GROUPS": truein Site Configuration.You should be able to control the CAG model from within: http://localhost:18000/admin/course_access_groups/
Good luck fiddling with it.
List of Bug Fixes
bug fix: MembershipRule queries was not working:
bug fix: cag admin cannot add GroupCourse:
fix bug: edx-organizaitons app is a requirement for CAG:
Refactor acl_backends.user_has_access to use AccessResponse:
fix query bug: don't check Membership for AnonymousUser:
Simplify check for public courses for AnonymousUser:
Fix exception when platform passes CourseDescriptorWithMixins to user_has_access:
Related PRs
Also see the related platform PR: appsembler/edx-platform#543