Skip to content

define a unseeding forums permissions and call into it from delete_cours... - #954

Merged
chrisndodge merged 7 commits into
masterfrom
fix/cdodge/remove-forum-permissions-on-delete
Sep 13, 2013
Merged

define a unseeding forums permissions and call into it from delete_cours...#954
chrisndodge merged 7 commits into
masterfrom
fix/cdodge/remove-forum-permissions-on-delete

Conversation

@chrisndodge

Copy link
Copy Markdown
Contributor

...e

Chris Dodge added 2 commits September 12, 2013 14:27
…urse

define a unseeding forums permissions and call into it from delete_course

define a unseeding forums permissions and call into it from delete_course
…se with a different casing on the courseId
@chrisndodge

Copy link
Copy Markdown
Contributor Author

@cahrens @gwprice can you review? This is for STUD-754.

…ns does not accidentially delete another course's forum seeding

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe check first that permissions are seeded? Or perhaps that is well covered in another test.

If so, change the comment line to say "verify form unseeding".

@cahrens

cahrens commented Sep 12, 2013

Copy link
Copy Markdown

Just some stylistic comments. I can't say whether or not this code is sufficient to completely unprovision a forum, but I assume Greg knows.

@chrisndodge

Copy link
Copy Markdown
Contributor Author

@cahrens @gwprice addressed comments except for the .filter() suggestion

@cahrens

cahrens commented Sep 12, 2013

Copy link
Copy Markdown

👍 Once tests pass.

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 should be combined with the other import from this module

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actually, this should not be invoked directly in this test.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I do think it is worth testing the unseed_permissions_roles method in isolation, though perhaps not in this file (in addition to testing that the deletion unseeds permissions).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Agreed (including that it doesn't belong in this file)

…nction in CMS. Update tests to use new method

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, this looks better! But (ducking...) can you also add a test for unseed_permissions_roles in isolation? It would be in the test file for django_comment_common/utils.py.

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.

Yea, I agree. But when I try to do this, I see that in django_comment_common/module.py, there's a dependency on a course to be in the modulestore (line 70) so that it can dereference course.forum_posts_allowed. I'm sure there's a way to get a course factory or something else in there, but I'd like to timebox this...

@cahrens

cahrens commented Sep 13, 2013

Copy link
Copy Markdown

👍 I agree with timeboxing the investigation of the targeted unit tests for unseed_permissions_roles.

chrisndodge pushed a commit that referenced this pull request Sep 13, 2013
…on-delete

define a unseeding forums permissions and call into it from delete_cours...
@chrisndodge
chrisndodge merged commit b676149 into master Sep 13, 2013
macornwell pushed a commit to open-craft/openedx-platform that referenced this pull request Nov 23, 2017
AuraAlba pushed a commit to eduNEXT/edx-platform that referenced this pull request Sep 26, 2018
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