|
|
|
|
@ -47,7 +47,7 @@ |
|
|
|
|
|
|
|
|
|
<div class="course-tool__options"> |
|
|
|
|
<button |
|
|
|
|
v-if="(isCurrentTeacher || isSessionAdmin) && !isSorting && !isCustomizing && (props.tool.isInASession ? props.tool.allowEditToolVisibilityInSession : true)" |
|
|
|
|
v-if="(securityStore.isCourseAdmin) && !isSorting && !isCustomizing && (props.tool.isInASession ? props.tool.allowEditToolVisibilityInSession : true)" |
|
|
|
|
@click="changeVisibility(course, tool)" |
|
|
|
|
> |
|
|
|
|
<BaseIcon |
|
|
|
|
@ -62,7 +62,7 @@ |
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
<a |
|
|
|
|
v-if="isCurrentTeacher && isCustomizing" |
|
|
|
|
v-if="securityStore.isCurrentTeacher && isCustomizing" |
|
|
|
|
href="#" |
|
|
|
|
> |
|
|
|
|
<BaseIcon |
|
|
|
|
@ -72,7 +72,7 @@ |
|
|
|
|
</a> |
|
|
|
|
|
|
|
|
|
<!-- a |
|
|
|
|
v-if="isCurrentTeacher" |
|
|
|
|
v-if="securityStore.isCurrentTeacher" |
|
|
|
|
:href="goToSettingCourseTool(course, tool)" |
|
|
|
|
> |
|
|
|
|
<BaseIcon |
|
|
|
|
@ -85,11 +85,11 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup> |
|
|
|
|
import { useStore } from "vuex" |
|
|
|
|
import { computed, inject } from "vue" |
|
|
|
|
import BaseIcon from "../basecomponents/BaseIcon.vue" |
|
|
|
|
import {useSecurityStore} from "../../store/securityStore"; |
|
|
|
|
|
|
|
|
|
const store = useStore() |
|
|
|
|
const securityStore = useSecurityStore() |
|
|
|
|
|
|
|
|
|
const isSorting = inject("isSorting") |
|
|
|
|
const isCustomizing = inject("isCustomizing") |
|
|
|
|
@ -124,8 +124,6 @@ const props = defineProps({ |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const isCurrentTeacher = computed(() => store.getters["security/isCurrentTeacher"]) |
|
|
|
|
const isSessionAdmin = computed(() => store.getters["security/isCurrentCourseSessionTeacher"]) |
|
|
|
|
const cardCustomClass = computed(() => { |
|
|
|
|
if (!isVisible.value) { |
|
|
|
|
return "bg-primary-bgdisabled hover:bg-gray-50/25 border-primary-borderdisabled shadow-none " |
|
|
|
|
|