Factor the core Capa problem logic into a mixin. - #2124
Merged
jorr-at-google merged 1 commit intoJan 16, 2014
Conversation
Contributor
There was a problem hiding this comment.
Generally, I think it's preferred to use super for this sort of thing. I would make CapaMixin.__init__ take *args and **kwargs, and then call super with both of those (without looking at the arguments).
Contributor
|
Did you need to change anything in the code you moved from capa_module to capa_base? |
Contributor
Author
|
Rebased to head on master. The only code changes are to:
|
Contributor
Author
|
Also, using super.init() now. |
Contributor
|
👍 |
Contributor
|
@nedbat: Can you double check this, make sure I'm not missing something? |
Contributor
There was a problem hiding this comment.
self.system isn't provided by XBlock, only by XModule. CapaMixin should use self.runtime instead (they mean the same thing, but runtime is the attribute name used by XBlocks).
Contributor
|
👍 the dual-diff strategy worked great. |
This mixin can be used by either the current XModule, or by an XBlock. Leave the XModule-specific code in capa_module and move the shared code to capa_base. Plan to move caba_base into the capa package in the future.
jorr-at-google
added a commit
that referenced
this pull request
Jan 16, 2014
…tures-into-mixin Factor the core Capa problem logic into a mixin.
jenkins-ks
pushed a commit
to nttks/edx-platform
that referenced
this pull request
Sep 22, 2017
* Add menu to ga_operation for ga_analyzer openedx#2039 (openedx#2088) * add role for old course viewer openedx#2062 (openedx#2087) * add role for old course viewer openedx#2062 * Change action for biz course by BetaTester role openedx#2062 * Construction of image server openedx#2025 (openedx#2106) * cherry-pick 8c8953f * Fix file upload in IE * Construction of image server openedx#2025 * add all keywords search in Student management openedx#2029 (openedx#2034) * Fix bug for before enrollment start in ga old course viewer openedx#2062 (openedx#2125) * fix. Construction of image server openedx#2025 (openedx#2117) * Modify message and css of enrollment for Course About openedx#2130 * Add a certificate list to user's profile page. openedx#2042 (openedx#2108) * Mod UT openedx#2130 * add PDF File Construction of image server openedx#2025 (openedx#2140) * add library option, and library links to the course. openedx#2001 (openedx#2124) * Invalid StudioPermissionsService object in API to show/save xblock settings in CMS. Randomized Content Block editor did not check Studio user's permissions * add library option, and library links to the course. openedx#2001 * fix. add all keywords search in Student management openedx#2029 (openedx#2034) (openedx#2157) * second fix. Construction of image server openedx#2025 (openedx#2158) * add library option, and library links to the course. openedx#2001 (openedx#2160) * third fix. Construction of image server openedx#2163 (openedx#2164) * Add filter by category for certificates on profile page openedx#2042 (openedx#2165) * Fix bug for add library option, and library links to the course. openedx#2162 openedx#2133 (openedx#2167) * Develop/dogwood/gacco201708 (openedx#2170) * Fixed bugs openedx#2039 (openedx#2112) * Fixed csv format openedx#2039 (openedx#2127) * Change to split download if there are many display items openedx#916 (openedx#2121) * Change to split download if there are many display items openedx#916 * Fix UT * Fix Review * Fix review2
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.
This mixin can be used by either the current XModule, or by an XBlock. Leave the XModule-specific code in capa_module and move the shared code to capa_base. Plan to move caba_base into the capa package in the future.