Disable task content block creation for students
This commit is contained in:
parent
28f96f8517
commit
dda9f75011
|
|
@ -7,7 +7,7 @@
|
|||
:error="error"
|
||||
data-cy="modal-title-input"
|
||||
></modal-input>
|
||||
<checkbox v-if="showTaskSelection"
|
||||
<checkbox v-if="taskSelection"
|
||||
:checked="localContentBlock.isAssignment"
|
||||
:item="localContentBlock"
|
||||
:label="'Auftrag'"
|
||||
|
|
@ -55,7 +55,8 @@
|
|||
</div>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</modal>
|
||||
|
|
@ -75,6 +76,8 @@
|
|||
import TrashIcon from '@/components/icons/TrashIcon';
|
||||
import Checkbox from '@/components/Checkbox';
|
||||
|
||||
import {meQuery} from '@/graphql/queries';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
'content-block': Object,
|
||||
|
|
@ -115,13 +118,21 @@
|
|||
contents: [...this.contentBlock.contents],
|
||||
id: this.contentBlock.id || undefined,
|
||||
isAssignment: this.contentBlock.type && this.contentBlock.type === 'TASK'
|
||||
})
|
||||
}),
|
||||
me: {}
|
||||
}
|
||||
},
|
||||
|
||||
apollo: {
|
||||
me: meQuery
|
||||
},
|
||||
|
||||
computed: {
|
||||
titlePlaceholder() {
|
||||
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