Skip to content

Conversation

@jorr-at-google
Copy link
Contributor

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.

@ghost ghost assigned cpennington Jan 9, 2014
Copy link
Contributor

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).

@cpennington
Copy link
Contributor

Did you need to change anything in the code you moved from capa_module to capa_base?

@jorr-at-google
Copy link
Contributor Author

Rebased to head on master.

The only code changes are to:

  1. Move big blocks of code from capa_module to capa_base
  2. Adap CapaModule to inherit from CapaMixin
  3. Remove now-unneeded imports from capa_module and capa_base
  4. Tiny adjusts to test mocking

@jorr-at-google
Copy link
Contributor Author

Also, using super.init() now.

@cpennington
Copy link
Contributor

👍

@cpennington
Copy link
Contributor

@nedbat: Can you double check this, make sure I'm not missing something?

@cpennington cpennington reopened this Jan 15, 2014
Copy link
Contributor

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).

@nedbat
Copy link
Contributor

nedbat commented Jan 16, 2014

👍 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.
@jorr-at-google jorr-at-google merged commit 6a1cc15 into master Jan 16, 2014
@jzoldak jzoldak deleted the jorr/feature/factor-shared-capa-features-into-mixin branch May 5, 2014 14:58
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
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.

4 participants