diff --git a/client/src/components/dueDates/DueDateSingle.vue b/client/src/components/dueDates/DueDateSingle.vue index 47f659d7..b3261187 100644 --- a/client/src/components/dueDates/DueDateSingle.vue +++ b/client/src/components/dueDates/DueDateSingle.vue @@ -30,6 +30,12 @@ const urlText = computed(() => { return result.trim(); }); +const showAsUrl = computed(() => { + return ["SUPERVISOR", "EXPERT", "MEMBER"].includes( + props.dueDate.course_session.my_role + ); +}); + const url = computed(() => { if (["SUPERVISOR", "EXPERT"].includes(props.dueDate.course_session.my_role)) { return props.dueDate.url_expert; @@ -45,18 +51,24 @@ const url = computed(() => { >
- + {{ dayjs(props.dueDate.start).format("dddd D. MMMM YYYY") }} + + {{ dayjs(props.dueDate.start).format("dddd D. MMMM YYYY") }} +
- + {{ urlText }} + + {{ urlText }} +
diff --git a/server/vbv_lernwelt/dashboard/views.py b/server/vbv_lernwelt/dashboard/views.py index 1f2e7e6a..d6e83ae7 100644 --- a/server/vbv_lernwelt/dashboard/views.py +++ b/server/vbv_lernwelt/dashboard/views.py @@ -117,11 +117,13 @@ def has_cs_role(roles: Set[str]) -> bool: def user_role(roles: Set[str]) -> str: - return ( - "SUPERVISOR" - if "SUPERVISOR" in roles - else ("EXPERT" if "EXPERT" in roles else "MEMBER") - ) + if "SUPERVISOR" in roles: + return "SUPERVISOR" + if "EXPERT" in roles: + return "EXPERT" + if "MEMBER" in roles: + return "MEMBER" + return "LEARNING_MENTOR" @api_view(["GET"])