Add lesson attendance from presence (present/late/absent).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-21 12:37:01 +03:00
co-authored by Cursor
parent d3c2327e23
commit a2b35da4dd
12 changed files with 835 additions and 11 deletions
+10 -1
View File
@@ -87,7 +87,11 @@ internal static class LessonLearningSystem
if (!TeacherStandingIn(places, lesson.TeacherId, lesson.RoomId))
{
school.TryLogLessonOnce(personId, PersonLogTypes.LessonNoTeacher, lesson.Subject);
TryWriteAbsentTeacherMark(school, person, lesson, rules);
if (!AttendanceSystem.IsLateForMark(school, rules, lesson.Period))
{
TryWriteAbsentTeacherMark(school, person, lesson, rules);
}
return;
}
@@ -174,6 +178,11 @@ internal static class LessonLearningSystem
float warmth,
float textbookFactor)
{
if (AttendanceSystem.IsLateForMark(school, rules, lesson.Period))
{
return;
}
if (!school.TryClaimLessonMark(person.Id, school.Clock.Time.Date, lesson.Period))
{
return;