diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d58e466b99296765d1b74fb19eb350e5e67b15ea..9a6befb8120c2e1be2e0bcca174ebd1cabb9ba94 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,14 @@ All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog`_, and this project adheres to `Semantic Versioning`_. +`4.0.0.dev1`_ - 2024-06-13 +-------------------------- + +Added +~~~~~ + +* Support for entering absences for students in the new coursebook interface. + `4.0.0.dev0`_ - 2024-04-23 -------------------------- @@ -33,6 +41,14 @@ Fixed * Migrating failed due to an incorrect field reference. +`3.0.1`_ - 2023-09-02 +------------------- + +Fixed +~~~~~ + +* Migrations failed on empty database + `3.0`_ - 2023-05-15 ------------------- @@ -343,4 +359,5 @@ Fixed .. _2.1.1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/2.1.1 .. _3.0b0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/3.0b0 .. _3.0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/3.0 +.. _3.0.1: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/3.0.1 .. _4.0.0.dev0: https://edugit.org/AlekSIS/Official/AlekSIS-App-Alsijil/-/tags/4.0.0.dev0 diff --git a/README.rst b/README.rst index 61e80f73c24aa9077218aa86a2427463f75f1f0f..53fbc493f0f1acfd35a0f893c816cfb117a27572 100644 --- a/README.rst +++ b/README.rst @@ -34,10 +34,11 @@ Licence Copyright © 2019, 2021 Dominik George <dominik.george@teckids.org> Copyright © 2019, 2020 Tom Teichler <tom.teichler@teckids.org> Copyright © 2019 mirabilos <thorsten.glaser@teckids.org> - Copyright © 2020, 2021, 2022 Jonathan Weth <dev@jonathanweth.de> - Copyright © 2020, 2021 Julian Leucker <leuckeju@katharineum.de> - Copyright © 2020, 2022 Hangzhi Yu <yuha@katharineum.de> + Copyright © 2020, 2021, 2022, 2024 Jonathan Weth <dev@jonathanweth.de> + Copyright © 2020, 2021, 2024 Julian Leucker <leuckeju@katharineum.de> + Copyright © 2020, 2022, 2023, 2024 Hangzhi Yu <yuha@katharineum.de> Copyright © 2021 Lloyd Meins <meinsll@katharineum.de> + Copyright © 2024 Michael Bauer <michael-bauer@posteo.de> Licenced under the EUPL, version 1.2 or later, by Teckids e.V. (Bonn, Germany). diff --git a/aleksis/apps/alsijil/apps.py b/aleksis/apps/alsijil/apps.py index b523b38afa08c965628afbfbe61327e8b03f7067..ab0877f2f457658463c034e09139d8098df5b8d3 100644 --- a/aleksis/apps/alsijil/apps.py +++ b/aleksis/apps/alsijil/apps.py @@ -13,8 +13,9 @@ class AlsijilConfig(AppConfig): ([2019, 2021], "Dominik George", "dominik.george@teckids.org"), ([2019, 2020], "Tom Teichler", "tom.teichler@teckids.org"), ([2019], "mirabilos", "thorsten.glaser@teckids.org"), - ([2020, 2021, 2022], "Jonathan Weth", "dev@jonathanweth.de"), - ([2020, 2021], "Julian Leucker", "leuckeju@katharineum.de"), - ([2020, 2022], "Hangzhi Yu", "yuha@katharineum.de"), + ([2020, 2021, 2022, 2024], "Jonathan Weth", "dev@jonathanweth.de"), + ([2020, 2021, 2024], "Julian Leucker", "leuckeju@katharineum.de"), + ([2020, 2022, 2023, 2024], "Hangzhi Yu", "yuha@katharineum.de"), ([2021], "Lloyd Meins", "meinsll@katharineum.de"), + ([2024], "Michael Bauer", "michael-bauer@posteo.de"), ) diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsTrigger.vue b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsTrigger.vue index 572036c67955b3365bb46eb69f6ab41ee86cf074..a7854c9ae41c9fe73a7d011f60f1abd09ad42145 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsTrigger.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/absences/ManageStudentsTrigger.vue @@ -58,6 +58,7 @@ export default { v-bind="documentationPartProps" @update="() => null" :loading-indicator="loading" + v-if="!documentation.amends?.cancelled" > <template #activator="{ attrs, on }"> <v-chip diff --git a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue index 652609dccaf430d3a4ab138f80ee2f810b84b4af..7128bb797bacedda08cf6e5f35f71b6f1bd6faad 100644 --- a/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue +++ b/aleksis/apps/alsijil/frontend/components/coursebook/documentation/LessonInformation.vue @@ -38,6 +38,10 @@ import PersonChip from "aleksis.core/components/person/PersonChip.vue"; :subject="documentation.subject" v-bind="compact ? dialogActivator.attrs : {}" v-on="compact ? dialogActivator.on : {}" + :class="{ + 'text-decoration-line-through': documentation.amends?.cancelled, + }" + :disabled="documentation.amends?.cancelled" /> <subject-chip v-if=" diff --git a/aleksis/apps/alsijil/models.py b/aleksis/apps/alsijil/models.py index c909a843873b243766293ab9649350078694a00f..2036260dca1a134571315d6b0e3e4a23ac720d92 100644 --- a/aleksis/apps/alsijil/models.py +++ b/aleksis/apps/alsijil/models.py @@ -695,6 +695,7 @@ class Documentation(CalendarEvent): self.participation_touched_at or not self.amends or self.value_start_datetime(self) > now() + or self.amends.cancelled ): # There is no source to update from or it's too early return diff --git a/aleksis/apps/alsijil/util/predicates.py b/aleksis/apps/alsijil/util/predicates.py index 122442edd50c08b193c7aa6798ff1a4c6e745856..eff4c8e7fd31314cebd62b8301867ebdecb3f3b3 100644 --- a/aleksis/apps/alsijil/util/predicates.py +++ b/aleksis/apps/alsijil/util/predicates.py @@ -450,6 +450,8 @@ def can_edit_documentation(user: User, obj: Documentation): def can_view_participation_status(user: User, obj: Documentation): """Predicate which checks if the user is allowed to view participation for a documentation.""" if obj: + if obj.amends and obj.amends.cancelled: + return False if is_documentation_teacher(user, obj): return True if obj.amends: @@ -465,6 +467,8 @@ def can_view_participation_status(user: User, obj: Documentation): def can_edit_participation_status(user: User, obj: Documentation): """Predicate which checks if the user is allowed to edit participation for a documentation.""" if obj: + if obj.amends and obj.amends.cancelled: + return False if is_documentation_teacher(user, obj): return True if obj.amends: diff --git a/pyproject.toml b/pyproject.toml index 03a0772bee8aa34ffc35dc565a1762b87745abbb..f8457ce5c4feec15c21f780d08ab960c05418d4f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "AlekSIS-App-Alsijil" -version = "4.0.0.dev1" +version = "4.0.0.dev3" packages = [ { include = "aleksis" } ]