Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AlekSIS/official/AlekSIS-App-Alsijil
  • sunweaver/AlekSIS-App-Alsijil
  • 8tincsoVluke/AlekSIS-App-Alsijil
  • perfreicpo/AlekSIS-App-Alsijil
  • noifobarep/AlekSIS-App-Alsijil
  • 7ingannisdo/AlekSIS-App-Alsijil
  • unmruntartpa/AlekSIS-App-Alsijil
  • balrorebta/AlekSIS-App-Alsijil
  • comliFdifwa/AlekSIS-App-Alsijil
  • 3ranaadza/AlekSIS-App-Alsijil
10 results
Show changes
Commits on Source (4)
......@@ -11,7 +11,7 @@ from calendarweek import CalendarWeek
from aleksis.apps.chronos.models import LessonEvent
from aleksis.core.managers import (
AlekSISBaseManagerWithoutMigrations,
RecurrencePolymorphicManager,
CalendarEventManager,
)
if TYPE_CHECKING:
......@@ -73,7 +73,7 @@ class GroupRoleAssignmentQuerySet(QuerySet):
return self.filter(Q(groups=group) | Q(groups__child_groups=group))
class DocumentationManager(RecurrencePolymorphicManager):
class DocumentationManager(CalendarEventManager):
"""Manager adding specific methods to documentations."""
def for_school_term(self, school_term: "SchoolTerm") -> QuerySet["Documentation"]:
......@@ -107,7 +107,7 @@ class DocumentationManager(RecurrencePolymorphicManager):
)
class ParticipationStatusManager(RecurrencePolymorphicManager):
class ParticipationStatusManager(CalendarEventManager):
"""Manager adding specific methods to participation statuses."""
pass
......@@ -102,6 +102,3 @@ class GroupTypePriorityCoursebook(ModelChoicePreference):
"select field on the coursebook overview page"
)
help_text = _("If you leave it empty, no group type will be used.")
def get_queryset(self):
return GroupType.objects.managed_and_unmanaged()
......@@ -29,6 +29,7 @@ class ExtraMarkBatchCreateMutation(BaseBatchCreateMutation):
model = ExtraMark
fields = ("short_name", "name", "colour_fg", "colour_bg", "show_in_coursebook")
optional_fields = ("name",)
permissions = ("alsijil.create_extramark_rule",)
@classmethod
def check_permissions(cls, root, info, input): # noqa
......@@ -40,6 +41,7 @@ class ExtraMarkBatchCreateMutation(BaseBatchCreateMutation):
class ExtraMarkBatchDeleteMutation(BaseBatchDeleteMutation):
class Meta:
model = ExtraMark
permissions = ("alsijil.create_extramark_rule",)
@classmethod
def check_permissions(cls, root, info, input): # noqa
......@@ -52,6 +54,7 @@ class ExtraMarkBatchPatchMutation(BaseBatchPatchMutation):
class Meta:
model = ExtraMark
fields = ("id", "short_name", "name", "colour_fg", "colour_bg", "show_in_coursebook")
permissions = ("alsijil.create_extramark_rule",)
@classmethod
def check_permissions(cls, root, info, input): # noqa
......
......@@ -86,6 +86,7 @@ class ParticipationStatusBatchPatchMutation(BaseBatchPatchMutation):
"tardiness",
) # Only the reason and tardiness can be updated after creation
return_field_name = "participationStatuses"
permissions = ("alsijil.edit_participation_status_for_documentation_with_time_range_rule",)
@classmethod
def check_permissions(cls, root, info, input, *args, **kwargs): # noqa: A002
......