Merge branch 'hotfix/selected-class-type-error' into develop
This commit is contained in:
commit
5dd7958334
|
|
@ -2,7 +2,7 @@
|
||||||
<div
|
<div
|
||||||
class="read-only-banner"
|
class="read-only-banner"
|
||||||
data-cy="read-only-banner"
|
data-cy="read-only-banner"
|
||||||
v-if="me.readOnly || me.selectedClass.readOnly"
|
v-if="isReadOnly"
|
||||||
>
|
>
|
||||||
<div class="read-only-banner__content">
|
<div class="read-only-banner__content">
|
||||||
<p class="read-only-banner__text">{{ readOnlyText }} Sie können Inhalte lesen, aber nicht bearbeiten.</p>
|
<p class="read-only-banner__text">{{ readOnlyText }} Sie können Inhalte lesen, aber nicht bearbeiten.</p>
|
||||||
|
|
@ -76,6 +76,9 @@ export default {
|
||||||
readOnlyText() {
|
readOnlyText() {
|
||||||
return this.me.readOnly ? 'Sie besitzen keine aktive Lizenz.' : 'Sie sind in dieser Klasse nicht mehr aktiv.';
|
return this.me.readOnly ? 'Sie besitzen keine aktive Lizenz.' : 'Sie sind in dieser Klasse nicht mehr aktiv.';
|
||||||
},
|
},
|
||||||
|
isReadOnly() {
|
||||||
|
return this.me.readOnly || this.me.selectedClass?.readOnly;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
:spellcheck-loading="spellcheckLoading"
|
:spellcheck-loading="spellcheckLoading"
|
||||||
:saved="!unsaved"
|
:saved="!unsaved"
|
||||||
:spellcheck="true"
|
:spellcheck="true"
|
||||||
:read-only="me.readOnly || me.selectedClass.readOnly"
|
:read-only="me.readOnly || me.selectedClass?.readOnly"
|
||||||
placeholder="Ergebnis erfassen"
|
placeholder="Ergebnis erfassen"
|
||||||
action="Ergebnis mit Lehrperson teilen"
|
action="Ergebnis mit Lehrperson teilen"
|
||||||
shared-msg="Das Ergebnis wurde mit der Lehrperson geteilt."
|
shared-msg="Das Ergebnis wurde mit der Lehrperson geteilt."
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<div
|
<div
|
||||||
class="module-navigation__toggle-menu"
|
class="module-navigation__toggle-menu"
|
||||||
data-cy="module-teacher-menu"
|
data-cy="module-teacher-menu"
|
||||||
v-if="canManageContent && !me.readOnly && !me.selectedClass.readOnly"
|
v-if="canManageContent && !me.readOnly && !me.selectedClass?.readOnly"
|
||||||
>
|
>
|
||||||
<snapshot-menu class="module-navigation__actions" />
|
<snapshot-menu class="module-navigation__actions" />
|
||||||
<router-link
|
<router-link
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ export default {
|
||||||
return `room-widget--${this.appearance}`;
|
return `room-widget--${this.appearance}`;
|
||||||
},
|
},
|
||||||
canEditRoom() {
|
canEditRoom() {
|
||||||
return this.me.isTeacher && !this.me.readOnly && !this.me.selectedClass.readOnly;
|
return this.me.isTeacher && !this.me.readOnly && !this.me.selectedClass?.readOnly;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ const getCanManageContent = (me: Me): boolean => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const getIsReadOnly = (me: Me): boolean => {
|
const getIsReadOnly = (me: Me): boolean => {
|
||||||
return me.readOnly || me.selectedClass.readOnly;
|
return me.readOnly || me.selectedClass?.readOnly;
|
||||||
};
|
};
|
||||||
|
|
||||||
const getCurrentClassName = (me: Me) => {
|
const getCurrentClassName = (me: Me) => {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
:show-code-route="showCodeRoute"
|
:show-code-route="showCodeRoute"
|
||||||
:read-only="me.readOnly"
|
:read-only="me.readOnly"
|
||||||
:can-edit="me.isTeacher"
|
:can-edit="me.isTeacher"
|
||||||
:enable-deactivate="!me.readOnly && !me.selectedClass.readOnly"
|
:enable-deactivate="!me.readOnly && !me.selectedClass?.readOnly"
|
||||||
title="Klassenliste"
|
title="Klassenliste"
|
||||||
class="my-class__class"
|
class="my-class__class"
|
||||||
@add="add"
|
@add="add"
|
||||||
|
|
@ -72,7 +72,7 @@ export default {
|
||||||
];
|
];
|
||||||
|
|
||||||
// if we changed the currently selected class of the logged in user, we need to change this property too
|
// if we changed the currently selected class of the logged in user, we need to change this property too
|
||||||
const readOnly = member.isMe ? !active : me.selectedClass.readOnly;
|
const readOnly = member.isMe ? !active : me.selectedClass?.readOnly;
|
||||||
const data = {
|
const data = {
|
||||||
me: {
|
me: {
|
||||||
...me,
|
...me,
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@
|
||||||
:project="project.slug"
|
:project="project.slug"
|
||||||
class="project__add-entry"
|
class="project__add-entry"
|
||||||
data-cy="add-project-entry"
|
data-cy="add-project-entry"
|
||||||
v-if="isOwner && !me.readOnly && !me.selectedClass.readOnly"
|
v-if="canEdit"
|
||||||
/>
|
/>
|
||||||
<project-entry
|
<project-entry
|
||||||
v-bind="entry"
|
v-bind="entry"
|
||||||
|
|
@ -115,7 +115,7 @@ export default {
|
||||||
return this.project.entries ? this.project.entries.length : 0;
|
return this.project.entries ? this.project.entries.length : 0;
|
||||||
},
|
},
|
||||||
canEdit() {
|
canEdit() {
|
||||||
return !this.me.readOnly && !this.me.selectedClass.readOnly && this.isOwner;
|
return !this.me.readOnly && !this.me.selectedClass?.readOnly && this.isOwner;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
readOnly() {
|
readOnly() {
|
||||||
return this.me.readOnly || this.me.selectedClass.readOnly;
|
return this.me.readOnly || this.me.selectedClass?.readOnly;
|
||||||
},
|
},
|
||||||
assignmentText() {
|
assignmentText() {
|
||||||
const text = this.studentSubmission.assignment.assignment;
|
const text = this.studentSubmission.assignment.assignment;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue