diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeOptions.vue b/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeOptions.vue
index 9048aebb78..c48d212458 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeOptions.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeOptions.vue
@@ -282,9 +282,11 @@
});
},
moveNode(target) {
- return this.moveContentNodes({ id__in: [this.nodeId], parent: target }).then(
- this.$refs.moveModal.moveComplete
- );
+ return this.moveContentNodes({
+ id__in: [this.nodeId],
+ parent: target,
+ inherit: this.node.parent !== target,
+ }).then(this.$refs.moveModal.moveComplete);
},
getRemoveNodeRedirect() {
// Returns a callback to do appropriate post-removal navigation
@@ -322,7 +324,7 @@
removeNode: withChangeTracker(function(id__in, changeTracker) {
this.trackAction('Delete');
const redirect = this.getRemoveNodeRedirect();
- return this.moveContentNodes({ id__in, parent: this.trashId }).then(() => {
+ return this.moveContentNodes({ id__in, parent: this.trashId, inherit: false }).then(() => {
redirect();
this.showSnackbar({
text: this.$tr('removedItems'),
diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/InheritAncestorMetadataModal.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/InheritAncestorMetadataModal.vue
index 4147ab63e5..87d6bbb7d6 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/InheritAncestorMetadataModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/InheritAncestorMetadataModal.vue
@@ -10,10 +10,10 @@
@cancel="closed = true"
>
-
- {{ $tr('inheritMetadataDescription') }}
-
+
+ {{ $tr('inheritMetadataDescription') }}
+
!isUndefined(this.parent.extra_fields.inherit_metadata[field])
+ field => !isUndefined(this.parent.extra_fields.inherited_metadata[field])
)
);
},
@@ -141,6 +141,11 @@
fieldsToInherit() {
return Object.keys(this.inheritableMetadataItems).filter(field => this.checks[field]);
},
+ parentHasNonLanguageMetadata() {
+ return (
+ !isEmpty(this.categories) || !isEmpty(this.grade_levels) || !isEmpty(this.learner_needs)
+ );
+ },
parentHasInheritableMetadata() {
return !isEmpty(this.inheritableMetadataItems);
},
@@ -198,10 +203,10 @@
ContentNode.getAncestors(this.parent.id).then(ancestors => {
for (const field of inheritableFields) {
if (
- this.parent.extra_fields.inherit_metadata &&
- this.parent.extra_fields.inherit_metadata[field]
+ this.parent.extra_fields.inherited_metadata &&
+ this.parent.extra_fields.inherited_metadata[field]
) {
- this.checks[field] = this.parent.extra_fields.inherit_metadata[field];
+ this.checks[field] = this.parent.extra_fields.inherited_metadata[field];
}
}
this.categories = ancestors.reduce((acc, ancestor) => {
@@ -253,19 +258,19 @@
// but just in case, return
return;
}
- const inherit_metadata = {
- ...(this.parent?.extra_fields.inherit_metadata || {}),
+ const inherited_metadata = {
+ ...(this.parent?.extra_fields.inherited_metadata || {}),
};
for (const field of inheritableFields) {
if (this.inheritableMetadataItems[field]) {
// Only store preferences for fields that have been shown to the user as inheritable
- inherit_metadata[field] = this.checks[field];
+ inherited_metadata[field] = this.checks[field];
}
}
this.updateContentNode({
id: this.parent.id,
extra_fields: {
- inherit_metadata,
+ inherited_metadata,
},
});
},
diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/move/MoveModal.vue b/contentcuration/contentcuration/frontend/channelEdit/components/move/MoveModal.vue
index d5c6164863..a68c50d51b 100644
--- a/contentcuration/contentcuration/frontend/channelEdit/components/move/MoveModal.vue
+++ b/contentcuration/contentcuration/frontend/channelEdit/components/move/MoveModal.vue
@@ -135,7 +135,7 @@