Skip to content
Snippets Groups Projects
Commit 76e978f3 authored by Ron Lucke's avatar Ron Lucke Committed by Elmar Ludwig
Browse files

fixes #318

parent a6bec4eb
No related branches found
No related tags found
No related merge requests found
...@@ -119,8 +119,13 @@ class StructuralElementsUpdate extends JsonApiController ...@@ -119,8 +119,13 @@ class StructuralElementsUpdate extends JsonApiController
} }
} }
$resource->release_date = $json['data']['attributes']['release-date']; if (isset($json['data']['attributes']['release-date'])) {
$resource->withdraw_date = $json['data']['attributes']['withdraw-date']; $resource->release_date = $json['data']['attributes']['release-date'];
}
if (isset($json['data']['attributes']['withdraw-date'])) {
$resource->withdraw_date = $json['data']['attributes']['withdraw-date'];
}
// update parent // update parent
if (self::arrayHas($json, 'data.relationships.parent')) { if (self::arrayHas($json, 'data.relationships.parent')) {
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
type="current" type="current"
:currentElement="currentElement" :currentElement="currentElement"
@selectElement="setCurrentId" @selectElement="setCurrentId"
@reloadElement="reloadElements"
/> />
</courseware-tab> </courseware-tab>
<courseware-tab :name="$gettext('Export')"> <courseware-tab :name="$gettext('Export')">
......
...@@ -312,6 +312,7 @@ export default { ...@@ -312,6 +312,7 @@ export default {
}); });
await this.unlockObject({ id: element.id, type: 'courseware-structural-elements' }); await this.unlockObject({ id: element.id, type: 'courseware-structural-elements' });
this.loadStructuralElement(this.currentElement.id); this.loadStructuralElement(this.currentElement.id);
this.$emit('reloadElement');
this.$store.dispatch('cwManagerFilingData', {}); this.$store.dispatch('cwManagerFilingData', {});
} else if(source === 'remote' || source === 'own') { } else if(source === 'remote' || source === 'own') {
//create Element //create Element
...@@ -341,6 +342,7 @@ export default { ...@@ -341,6 +342,7 @@ export default {
structuralElementId: this.currentElement.id structuralElementId: this.currentElement.id
}); });
await this.unlockObject({id: container.id, type: 'courseware-containers'}); await this.unlockObject({id: container.id, type: 'courseware-containers'});
this.$emit('reloadElement');
this.$store.dispatch('cwManagerFilingData', {}); this.$store.dispatch('cwManagerFilingData', {});
} else if (source === 'remote' || source === 'own') { } else if (source === 'remote' || source === 'own') {
let parentId = this.filingData.parentItem.id; let parentId = this.filingData.parentItem.id;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment