-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Content libraries settings overrides (SOL-46) #6399
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
Merged
bradenmacdonald
merged 6 commits into
openedx:content-libraries
from
open-craft:content_libraries/10-settings-overrides
Jan 7, 2015
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a758958
Support for overriding Scope.settings values when library content is …
bradenmacdonald 72e5533
Unrelated: fix two bugs when duplicating a LibraryContentModule
bradenmacdonald e2773b9
Fix two split mongo bugs that were causing problems...
bradenmacdonald a739634
Workaround an issue with capa modules
bradenmacdonald 70e6650
Acceptance test
bradenmacdonald 697adb1
Fix bug w/ publishing ( + test), move copy_from_template tests to the…
bradenmacdonald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -211,8 +211,8 @@ def inherit_metadata(descriptor, inherited_data): | |
|
|
||
| def own_metadata(module): | ||
| """ | ||
| Return a dictionary that contains only non-inherited field keys, | ||
| mapped to their serialized values | ||
| Return a JSON-friendly dictionary that contains only non-inherited field | ||
| keys, mapped to their serialized values | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some more details about this "intermediate" form would be nice, since you understand it so well now. :) |
||
| """ | ||
| return module.get_explicitly_set_fields_by_scope(Scope.settings) | ||
|
|
||
|
|
@@ -283,6 +283,8 @@ def has(self, key): | |
|
|
||
| def default(self, key): | ||
| """ | ||
| Check to see if the default should be from inheritance rather than from the field's global default | ||
| Check to see if the default should be from inheritance. If not | ||
| inheriting, this will raise KeyError which will cause the caller to use | ||
| the field's global default. | ||
| """ | ||
| return self.inherited_settings[key.field_name] | ||
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
Oops, something went wrong.
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.
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.
How is the persistence handled now?
Actually, looking below I see that update_item is still called. It just isn't an option anymore.
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.
I think that's because I pointed out to him that there was no obv use case nor test for
update_db=False