-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Factor the core Capa problem logic into a mixin. #2124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor the core Capa problem logic into a mixin. #2124
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
|
Did you need to change anything in the code you moved from capa_module to capa_base? |
|
Rebased to head on master. The only code changes are to:
|
|
Also, using super.init() now. |
|
👍 |
|
@nedbat: Can you double check this, make sure I'm not missing something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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).
|
👍 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.
…tures-into-mixin Factor the core Capa problem logic into a mixin.
* 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 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.