Skip to content
Snippets Groups Projects
Verified Commit a9d6f820 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Remove accidentally duplicated extension code.

parent 12d8370d
No related branches found
No related tags found
No related merge requests found
......@@ -3,28 +3,13 @@ from typing import Optional
from django.db.models import Exists, OuterRef
from biscuit.apps.chronos.models import Lesson, LessonPeriod
from biscuit.apps.chronos.models import LessonPeriod
from biscuit.apps.chronos.util import CalendarWeek
from biscuit.core.models import Group, Person
from .models import PersonalNote
@Person.property
def lessons_as_participant(self):
return Lesson.objects.filter(groups__members=self)
@Person.property
def lesson_periods_as_participant(self):
return LessonPeriod.objects.filter(lesson__groups__members=self)
@Person.property
def lesson_periods_as_teacher(self):
return LessonPeriod.objects.filter(lesson__teachers=self)
@Person.method
def mark_absent(self, day: date, starting_period: Optional[int] = 0, absent=True, excused=False):
wanted_week = CalendarWeek.from_date(day)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment