Disable task content block creation for students
This commit is contained in:
parent
28f96f8517
commit
dda9f75011
|
|
@ -7,7 +7,7 @@
|
||||||
:error="error"
|
:error="error"
|
||||||
data-cy="modal-title-input"
|
data-cy="modal-title-input"
|
||||||
></modal-input>
|
></modal-input>
|
||||||
<checkbox v-if="showTaskSelection"
|
<checkbox v-if="taskSelection"
|
||||||
:checked="localContentBlock.isAssignment"
|
:checked="localContentBlock.isAssignment"
|
||||||
:item="localContentBlock"
|
:item="localContentBlock"
|
||||||
:label="'Auftrag'"
|
:label="'Auftrag'"
|
||||||
|
|
@ -55,7 +55,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div slot="footer">
|
<div slot="footer">
|
||||||
<a class="button button--primary" data-cy="modal-save-button" :class="{'button--disabled': disableSave}" v-on:click="save">Speichern</a>
|
<a class="button button--primary" data-cy="modal-save-button" :class="{'button--disabled': disableSave}"
|
||||||
|
v-on:click="save">Speichern</a>
|
||||||
<a class="button" v-on:click="$emit('hide')">Abbrechen</a>
|
<a class="button" v-on:click="$emit('hide')">Abbrechen</a>
|
||||||
</div>
|
</div>
|
||||||
</modal>
|
</modal>
|
||||||
|
|
@ -75,6 +76,8 @@
|
||||||
import TrashIcon from '@/components/icons/TrashIcon';
|
import TrashIcon from '@/components/icons/TrashIcon';
|
||||||
import Checkbox from '@/components/Checkbox';
|
import Checkbox from '@/components/Checkbox';
|
||||||
|
|
||||||
|
import {meQuery} from '@/graphql/queries';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
'content-block': Object,
|
'content-block': Object,
|
||||||
|
|
@ -115,13 +118,21 @@
|
||||||
contents: [...this.contentBlock.contents],
|
contents: [...this.contentBlock.contents],
|
||||||
id: this.contentBlock.id || undefined,
|
id: this.contentBlock.id || undefined,
|
||||||
isAssignment: this.contentBlock.type && this.contentBlock.type === 'TASK'
|
isAssignment: this.contentBlock.type && this.contentBlock.type === 'TASK'
|
||||||
})
|
}),
|
||||||
|
me: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
apollo: {
|
||||||
|
me: meQuery
|
||||||
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
titlePlaceholder() {
|
titlePlaceholder() {
|
||||||
return this.blockType === 'RoomEntry' ? 'Titel für Raumeintrag erfassen' : 'Titel für Inhaltsblock erfassen';
|
return this.blockType === 'RoomEntry' ? 'Titel für Raumeintrag erfassen' : 'Titel für Inhaltsblock erfassen';
|
||||||
|
},
|
||||||
|
taskSelection() {
|
||||||
|
return this.showTaskSelection && this.me.permissions.includes('users.can_manage_school_class_content');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue