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 (37)
Showing
with 1808 additions and 518 deletions
......@@ -6,9 +6,10 @@ from django.db.models import Count
from django.utils.translation import gettext_lazy as _
from django_select2.forms import Select2Widget
from material import Layout, Row
from material import Fieldset, Layout, Row
from aleksis.apps.chronos.managers import TimetableType
from aleksis.apps.chronos.models import TimePeriod
from aleksis.core.models import Group, Person
from .models import ExcuseType, ExtraMark, LessonDocumentation, PersonalNote
......@@ -92,22 +93,36 @@ PersonalNoteFormSet = forms.modelformset_factory(
class RegisterAbsenceForm(forms.Form):
layout = Layout(
Row("date_start", "date_end"),
Row("from_period"),
Row("absent", "excused"),
Row("person"),
Row("remarks"),
Fieldset("", "person"),
Fieldset("", Row("date_start", "date_end"), Row("from_period", "to_period")),
Fieldset("", Row("absent", "excused"), Row("excuse_type"), Row("remarks")),
)
date_start = forms.DateField(label=_("Start date"), initial=datetime.today)
date_end = forms.DateField(label=_("End date"), initial=datetime.today)
from_period = forms.IntegerField(label=_("From period"), initial=0, min_value=0)
from_period = forms.ChoiceField(label=_("Start period"))
to_period = forms.ChoiceField(label=_("End period"))
person = forms.ModelChoiceField(
label=_("Person"), queryset=Person.objects.all(), widget=Select2Widget
)
absent = forms.BooleanField(label=_("Absent"), initial=True, required=False)
excused = forms.BooleanField(label=_("Excused"), initial=True, required=False)
excuse_type = forms.ModelChoiceField(
label=_("Excuse type"),
queryset=ExcuseType.objects.all(),
widget=Select2Widget,
required=False,
)
remarks = forms.CharField(label=_("Remarks"), max_length=30, required=False)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
period_choices = TimePeriod.period_choices
self.fields["from_period"].choices = period_choices
self.fields["to_period"].choices = period_choices
self.fields["from_period"].initial = TimePeriod.period_min
self.fields["to_period"].initial = TimePeriod.period_max
class ExtraMarkForm(forms.ModelForm):
layout = Layout("short_name", "name")
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -18,33 +18,37 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr ""
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr ""
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr ""
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr ""
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr ""
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr ""
#: forms.py:102
msgid "Start period"
msgstr ""
#: forms.py:103
msgid "From period"
msgid "End period"
msgstr ""
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
......@@ -52,19 +56,30 @@ msgid "Person"
msgstr ""
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr ""
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr ""
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr ""
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -84,15 +99,25 @@ msgid "Current week"
msgstr ""
#: menus.py:28
msgid "My overview"
msgstr ""
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr ""
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr ""
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
msgid "Excuse types"
msgstr ""
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -100,52 +125,51 @@ msgstr ""
msgid "Extra marks"
msgstr ""
#: models.py:18 models.py:124
#: models.py:24 models.py:176
msgid "Short name"
msgstr ""
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr ""
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
#: models.py:54 models.py:106
msgid "Year"
msgstr ""
#: models.py:75
#: models.py:86
msgid "Personal note"
msgstr ""
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr ""
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr ""
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr ""
#: models.py:102
#: models.py:115
msgid "Group note"
msgstr ""
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr ""
#: models.py:107
#: models.py:159
msgid "Lesson documentations"
msgstr ""
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr ""
......@@ -153,6 +177,22 @@ msgstr ""
msgid "Block adding personal notes for cancelled lessons"
msgstr ""
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr ""
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
#: tables.py:16 tables.py:36
msgid "Edit"
msgstr ""
......@@ -161,11 +201,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr ""
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr ""
......@@ -214,6 +249,7 @@ msgid "Late persons:"
msgstr ""
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr ""
......@@ -222,50 +258,123 @@ msgstr ""
msgid "Tardiness (in m)"
msgstr ""
#: templates/alsijil/class_register/person.html:7
msgid "Class register: person"
msgstr ""
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
#: templates/alsijil/class_register/person.html:19
msgid "Unexcused absences"
msgstr ""
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr ""
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr ""
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr ""
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr ""
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr ""
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr ""
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr ""
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr ""
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr ""
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr ""
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr ""
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
msgid "Groups"
msgstr ""
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr ""
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr ""
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr ""
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr ""
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr ""
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
msgid ""
"\n"
" There are no lessons for the selected group or teacher in this week.\n"
......@@ -333,6 +442,13 @@ msgstr ""
msgid "Substitution"
msgstr ""
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:6
msgid "Class register:"
msgstr ""
......@@ -388,11 +504,6 @@ msgstr ""
msgid "Late"
msgstr ""
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr ""
......@@ -468,18 +579,6 @@ msgstr ""
msgid "Absences and tardiness"
msgstr ""
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr ""
......@@ -507,12 +606,6 @@ msgstr ""
msgid "Yes"
msgstr ""
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:363
msgid "Lesson documentation for week"
msgstr ""
......@@ -525,46 +618,54 @@ msgstr ""
msgid "You either selected an invalid lesson or there is currently no lesson in progress."
msgstr ""
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr ""
#: views.py:116
#: views.py:120
msgid "The lesson documentation has been saved."
msgstr ""
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr ""
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr ""
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr ""
#: views.py:528
msgid "The absence has been marked as excused."
msgstr ""
#: views.py:633
msgid "The absence has been saved."
msgstr ""
#: views.py:488
#: views.py:658
msgid "The extra mark has been created."
msgstr ""
#: views.py:499
#: views.py:669
msgid "The extra mark has been saved."
msgstr ""
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr ""
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr ""
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr ""
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr ""
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"PO-Revision-Date: 2020-08-03 18:41+0000\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: 2020-08-21 14:02+0000\n"
"Last-Translator: Jonathan Weth <teckids@jonathanweth.de>\n"
"Language-Team: German <https://translate.edugit.org/projects/aleksis/"
"aleksis-app-alsijil/de/>\n"
......@@ -17,55 +17,70 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.1\n"
"X-Generator: Weblate 4.1.1\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr "Hausaufgabe zur nächsten Stunde"
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr "Gruppe"
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr "Lehrkraft"
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr "Es kann nur entweder eine Gruppe oder eine Lehrkraft ausgewählt werden."
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr "Startdatum"
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr "Enddatum"
#: forms.py:102
msgid "Start period"
msgstr "Startstunde"
#: forms.py:103
msgid "From period"
msgstr "Ab Stunde"
msgid "End period"
msgstr "Endstunde"
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
msgid "Person"
msgstr "Person"
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr "Abwesend"
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr "Entschuldigt"
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr "Entschuldigungsart"
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -85,15 +100,25 @@ msgid "Current week"
msgstr "Aktuelle Woche"
#: menus.py:28
msgid "My overview"
msgstr "Meine Übersicht"
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr "Meine Schüler*innen"
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr "Abwesenheit eintragen"
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
msgid "Excuse types"
msgstr "Entschuldigungsarten"
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -101,59 +126,79 @@ msgstr "Entschuldigungsarten"
msgid "Extra marks"
msgstr "Zusätzliche Markierungen"
#: models.py:18 models.py:124
#: models.py:24 models.py:176
msgid "Short name"
msgstr "Kurzname"
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr "Name"
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr "Entschuldigungsart"
#: models.py:54 models.py:106
msgid "Year"
msgstr "Jahr"
#: models.py:75
#: models.py:86
msgid "Personal note"
msgstr "Persönliche Notiz"
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr "Persönliche Notizen"
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr "Stundenthema"
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr "Hausaufgaben"
#: models.py:102
#: models.py:115
msgid "Group note"
msgstr "Gruppennotiz"
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr "Stunden-Dokumentation"
#: models.py:107
#: models.py:159
msgid "Lesson documentations"
msgstr "Stunden-Dokumentationen"
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr "Zusätzliche Markierung"
#: preferences.py:16
msgid "Block adding personal notes for cancelled lessons"
msgstr "Blockiere das Hinzufügen von persönlichen Notizen für ausgefallene Stunden"
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr "Daten von der ersten Stunde zu weiteren folgenden Stunden übernehmen"
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
"Blockiere das Hinzufügen von persönlichen Notizen für ausgefallene Stunden"
"Dies wird die Daten nur übernehmen, wenn die Daten in den Folgestunden leer "
"sind."
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
"Erlaube Lehrkräften, Unterrichtsstunden bereits am gleichen Tag und nicht "
"erst zu Beginn der Stunde zu öffnen"
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
"Unterrichtsstunden in der Vergangenheit werden nicht durch diese Einstellung "
"beeinflusst, sie können immer geöffnet werden."
#: tables.py:16 tables.py:36
msgid "Edit"
......@@ -163,11 +208,6 @@ msgstr "Bearbeiten"
msgid "Delete"
msgstr "Löschen"
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr "Abwesenheiten verwalten"
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr "Unterrichtsstunde"
......@@ -216,6 +256,7 @@ msgid "Late persons:"
msgstr "Verspätete Personen:"
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr "Verspätung"
......@@ -224,50 +265,126 @@ msgstr "Verspätung"
msgid "Tardiness (in m)"
msgstr "Verspätung (in m)"
#: templates/alsijil/class_register/person.html:7
msgid "Class register: person"
msgstr "Klassenbuch: Person"
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
"\n"
" Klassenbuchübersicht für %(person)s\n"
" "
#: templates/alsijil/class_register/person.html:19
msgid "Unexcused absences"
msgstr "Unentschuldigte Fehlzeiten"
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr "Markiere als"
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr "Es gibt keine unentschuldigten Unterrichtsstunden."
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr "Statistiken zu Fehlzeiten, Verspätungen und Bemerkungen"
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr "Absenzen"
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr "davon"
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr "Unentschuldigt"
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr "Relevante persönliche Notizen"
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr "Woche %(week)s"
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr "Alle als markieren"
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr "%(late)s' verspätet"
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr "Keine Schüler*innen verfügbar."
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr "Wochenansicht"
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr "Auswählen"
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr "KW %(week)s: %(instance)s"
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr "Stunde"
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
msgid "Groups"
msgstr "Gruppen"
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr "Fach"
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr "Lehrkräfte"
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr "unentschuldigt"
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr "Summierte Verspätung"
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr "Keine Stunden verfügbar"
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
msgid ""
"\n"
" There are no lessons for the selected group or teacher in this week.\n"
......@@ -342,6 +459,13 @@ msgstr "Findet gerade statt"
msgid "Substitution"
msgstr "Vertretung"
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr "e"
#: templates/alsijil/print/full_register.html:6
msgid "Class register:"
msgstr "Klassenbuch:"
......@@ -410,11 +534,6 @@ msgstr "Allgemein"
msgid "Late"
msgstr "Verspätet"
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr "Unentschuldigt"
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr "Benutzerdefinierte Entschuldigunsarten"
......@@ -490,18 +609,6 @@ msgstr "Kontaktdetails"
msgid "Absences and tardiness"
msgstr "Abwesenheiten und Verspätungen"
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr "Absenzen"
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr "davon"
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr "Relevante persönliche Notizen"
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr "Datum"
......@@ -529,12 +636,6 @@ msgstr "Verspät."
msgid "Yes"
msgstr "Ja"
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr "e"
#: templates/alsijil/print/full_register.html:363
msgid "Lesson documentation for week"
msgstr "Unterrichtsdokumentation für Woche"
......@@ -549,50 +650,61 @@ msgstr ""
"Sie haben eine ungültige Stunde ausgewählt oder es\n"
" läuft momentan keine Stunde."
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr "Ihnen ist es nicht erlaubt, eine Eintragung für eine Unterrichtsstunde in der Zukunft vorzunehmen."
#: views.py:116
#: views.py:120
msgid "The lesson documentation has been saved."
msgstr "Die Stunden-Dokumentation wurde gespeichert."
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr "Die persönlichen Notizen wurden gespeichert."
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr "Es gibt aktuell kein Schuljahr."
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr "Die Fehlzeiten wurden als entschuldigt markiert."
#: views.py:528
msgid "The absence has been marked as excused."
msgstr "Die Fehlzeit wurde als entschuldigt markiert."
#: views.py:633
msgid "The absence has been saved."
msgstr "Die Abwesenheit wurde gespeichert."
#: views.py:488
#: views.py:658
msgid "The extra mark has been created."
msgstr "Die zusätzliche Markierung wurde erstellt."
#: views.py:499
#: views.py:669
msgid "The extra mark has been saved."
msgstr "Die zusätzliche Markierung wurde gespeichert."
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr "Die zusätzliche Markierung wurde gelöscht."
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr "Die Entschuldigungsart wurde erstellt."
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr "Die Entschuldigunsart wurde gespeichert."
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr "Die Entschuldigungsart wurde gelöscht."
#~ msgid "Manage absence"
#~ msgstr "Abwesenheiten verwalten"
#~ msgid "Personal note filters"
#~ msgstr "Filter für persönliche Notizen"
......@@ -623,9 +735,6 @@ msgstr "Die Entschuldigungsart wurde gelöscht."
#~ msgid "Delete filter"
#~ msgstr "Filter löschen"
#~ msgid "Statistics on remarks"
#~ msgstr "Statistiken zu Bemerkungen"
#~ msgid "Count"
#~ msgstr "Anzahl"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: 2020-07-26 14:08+0000\n"
"Last-Translator: Marlene Grundey <grundema@katharineum.de>\n"
"Language-Team: French <https://translate.edugit.org/projects/aleksis/aleksis-app-alsijil/fr/>\n"
......@@ -18,33 +18,41 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.0.1\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr ""
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr "Groupe"
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr "Profs"
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr ""
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr "Date de début"
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr "Date de fin"
#: forms.py:102
#, fuzzy
#| msgid "From period"
msgid "Start period"
msgstr "De la période"
#: forms.py:103
msgid "From period"
#, fuzzy
#| msgid "From period"
msgid "End period"
msgstr "De la période"
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
......@@ -52,19 +60,32 @@ msgid "Person"
msgstr "Personne"
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr "Absent(e)"
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr "Excusé"
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
#, fuzzy
#| msgid "Excused"
msgid "Excuse type"
msgstr "Excusé"
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -84,17 +105,29 @@ msgid "Current week"
msgstr "Semaine actuelle"
#: menus.py:28
#, fuzzy
#| msgid "Personal overview"
msgid "My overview"
msgstr "Vue d'ensemble personnelle"
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr ""
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr "Registre de Absence"
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
#, fuzzy
#| msgid "Excused"
msgid "Excuse types"
msgstr "Excusé"
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -102,62 +135,59 @@ msgstr "Excusé"
msgid "Extra marks"
msgstr ""
#: models.py:18 models.py:124
#: models.py:24 models.py:176
#, fuzzy
#| msgid "First name"
msgid "Short name"
msgstr "Prénom"
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr ""
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
#, fuzzy
#| msgid "Excused"
msgid "Excuse type"
msgstr "Excusé"
#: models.py:54 models.py:106
msgid "Year"
msgstr ""
#: models.py:75
#: models.py:86
#, fuzzy
#| msgid "Personal notes"
msgid "Personal note"
msgstr "Notes personnelles"
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr "Notes personnelles"
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr "Sujet de cours"
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr "Devoirs"
#: models.py:102
#: models.py:115
#, fuzzy
#| msgid "Group"
msgid "Group note"
msgstr "Groupe"
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr "Documentation de cours"
#: models.py:107
#: models.py:159
#, fuzzy
#| msgid "Lesson documentation"
msgid "Lesson documentations"
msgstr "Documentation de cours"
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr ""
......@@ -165,6 +195,22 @@ msgstr ""
msgid "Block adding personal notes for cancelled lessons"
msgstr ""
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr ""
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
#: tables.py:16 tables.py:36
msgid "Edit"
msgstr ""
......@@ -173,11 +219,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr ""
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr "Cours"
......@@ -233,6 +274,7 @@ msgid "Late persons:"
msgstr ""
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr "Retard"
......@@ -243,52 +285,129 @@ msgstr "Retard"
msgid "Tardiness (in m)"
msgstr "Retard"
#: templates/alsijil/class_register/person.html:7
#, fuzzy
#| msgid "Class register"
msgid "Class register: person"
msgstr "Registre de la classe"
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
#: templates/alsijil/class_register/person.html:19
#, fuzzy
#| msgid "Unexcused"
msgid "Unexcused absences"
msgstr "injustifié(e)"
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr ""
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr ""
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr ""
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr "Absences"
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr "injustifié(e)"
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr "Notes personnelles importantes"
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr ""
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr ""
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr ""
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr ""
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr "Vue de semaine"
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr "Sélectionner"
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr ""
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr "Période"
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
#, fuzzy
#| msgid "Group"
msgid "Groups"
msgstr "Groupe"
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr "Sujet"
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr "Profs"
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr "Injustifié(e)"
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr "Résumé des retards"
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr ""
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
#, fuzzy
#| msgid ""
#| "\n"
......@@ -364,6 +483,13 @@ msgstr ""
msgid "Substitution"
msgstr ""
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr "e"
#: templates/alsijil/print/full_register.html:6
#, fuzzy
#| msgid "Class register"
......@@ -421,11 +547,6 @@ msgstr ""
msgid "Late"
msgstr ""
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr "injustifié(e)"
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr ""
......@@ -503,18 +624,6 @@ msgstr "Détails de contact"
msgid "Absences and tardiness"
msgstr "Absences et retards"
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr "Absences"
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr "Notes personnelles importantes"
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr "Date"
......@@ -542,12 +651,6 @@ msgstr ""
msgid "Yes"
msgstr "Oui"
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr "e"
#: templates/alsijil/print/full_register.html:363
#, fuzzy
#| msgid "Lesson documentation for calendar week"
......@@ -562,53 +665,61 @@ msgstr "Notes"
msgid "You either selected an invalid lesson or there is currently no lesson in progress."
msgstr ""
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr ""
#: views.py:116
#: views.py:120
#, fuzzy
#| msgid "Lesson documentation for calendar week"
msgid "The lesson documentation has been saved."
msgstr "Documentation de cours pour la semaine calendrier"
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr ""
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr ""
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr ""
#: views.py:528
msgid "The absence has been marked as excused."
msgstr ""
#: views.py:633
msgid "The absence has been saved."
msgstr ""
#: views.py:488
#: views.py:658
#, fuzzy
#| msgid "Lesson documentation for calendar week"
msgid "The extra mark has been created."
msgstr "Documentation de cours pour la semaine calendrier"
#: views.py:499
#: views.py:669
#, fuzzy
#| msgid "Lesson documentation for calendar week"
msgid "The extra mark has been saved."
msgstr "Documentation de cours pour la semaine calendrier"
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr ""
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr ""
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr ""
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: 2020-07-26 14:08+0000\n"
"Last-Translator: Julian <leuckerj@gmail.com>\n"
"Language-Team: Latin <https://translate.edugit.org/projects/aleksis/aleksis-app-alsijil/la/>\n"
......@@ -18,33 +18,37 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.0.1\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr ""
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr "Grex"
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr ""
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr ""
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr ""
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr ""
#: forms.py:102
msgid "Start period"
msgstr ""
#: forms.py:103
msgid "From period"
msgid "End period"
msgstr ""
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
......@@ -52,19 +56,30 @@ msgid "Person"
msgstr "Persona"
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr ""
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr ""
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr ""
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -84,15 +99,25 @@ msgid "Current week"
msgstr ""
#: menus.py:28
msgid "My overview"
msgstr ""
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr ""
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr ""
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
msgid "Excuse types"
msgstr ""
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -100,58 +125,57 @@ msgstr ""
msgid "Extra marks"
msgstr ""
#: models.py:18 models.py:124
#: models.py:24 models.py:176
#, fuzzy
#| msgid "First name"
msgid "Short name"
msgstr "Primus nomen"
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr ""
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
#: models.py:54 models.py:106
msgid "Year"
msgstr ""
#: models.py:75
#: models.py:86
#, fuzzy
#| msgid "Person"
msgid "Personal note"
msgstr "Persona"
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr ""
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr ""
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr ""
#: models.py:102
#: models.py:115
#, fuzzy
#| msgid "Group"
msgid "Group note"
msgstr "Grex"
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr ""
#: models.py:107
#: models.py:159
msgid "Lesson documentations"
msgstr ""
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr ""
......@@ -159,6 +183,22 @@ msgstr ""
msgid "Block adding personal notes for cancelled lessons"
msgstr ""
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr ""
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
#: tables.py:16 tables.py:36
msgid "Edit"
msgstr ""
......@@ -167,11 +207,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr ""
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr ""
......@@ -220,6 +255,7 @@ msgid "Late persons:"
msgstr ""
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr ""
......@@ -228,52 +264,125 @@ msgstr ""
msgid "Tardiness (in m)"
msgstr ""
#: templates/alsijil/class_register/person.html:7
msgid "Class register: person"
msgstr ""
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
#: templates/alsijil/class_register/person.html:19
msgid "Unexcused absences"
msgstr ""
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr ""
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr ""
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr ""
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr ""
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr ""
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr ""
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr ""
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr ""
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr ""
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr ""
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr ""
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
#, fuzzy
#| msgid "Group"
msgid "Groups"
msgstr "Grex"
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr ""
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr ""
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr ""
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr ""
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr ""
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
msgid ""
"\n"
" There are no lessons for the selected group or teacher in this week.\n"
......@@ -341,6 +450,13 @@ msgstr ""
msgid "Substitution"
msgstr ""
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:6
msgid "Class register:"
msgstr ""
......@@ -396,11 +512,6 @@ msgstr ""
msgid "Late"
msgstr ""
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr ""
......@@ -476,18 +587,6 @@ msgstr ""
msgid "Absences and tardiness"
msgstr ""
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr "dies"
......@@ -515,12 +614,6 @@ msgstr ""
msgid "Yes"
msgstr ""
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:363
msgid "Lesson documentation for week"
msgstr ""
......@@ -533,47 +626,55 @@ msgstr ""
msgid "You either selected an invalid lesson or there is currently no lesson in progress."
msgstr ""
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr ""
#: views.py:116
#: views.py:120
msgid "The lesson documentation has been saved."
msgstr ""
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr ""
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr ""
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr ""
#: views.py:528
msgid "The absence has been marked as excused."
msgstr ""
#: views.py:633
msgid "The absence has been saved."
msgstr ""
#: views.py:488
#: views.py:658
msgid "The extra mark has been created."
msgstr ""
#: views.py:499
#: views.py:669
msgid "The extra mark has been saved."
msgstr ""
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr ""
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr ""
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr ""
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,33 +17,37 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr ""
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr ""
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr ""
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr ""
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr ""
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr ""
#: forms.py:102
msgid "Start period"
msgstr ""
#: forms.py:103
msgid "From period"
msgid "End period"
msgstr ""
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
......@@ -51,19 +55,30 @@ msgid "Person"
msgstr ""
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr ""
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr ""
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr ""
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -83,15 +98,25 @@ msgid "Current week"
msgstr ""
#: menus.py:28
msgid "My overview"
msgstr ""
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr ""
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr ""
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
msgid "Excuse types"
msgstr ""
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -99,52 +124,51 @@ msgstr ""
msgid "Extra marks"
msgstr ""
#: models.py:18 models.py:124
#: models.py:24 models.py:176
msgid "Short name"
msgstr ""
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr ""
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
#: models.py:54 models.py:106
msgid "Year"
msgstr ""
#: models.py:75
#: models.py:86
msgid "Personal note"
msgstr ""
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr ""
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr ""
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr ""
#: models.py:102
#: models.py:115
msgid "Group note"
msgstr ""
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr ""
#: models.py:107
#: models.py:159
msgid "Lesson documentations"
msgstr ""
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr ""
......@@ -152,6 +176,22 @@ msgstr ""
msgid "Block adding personal notes for cancelled lessons"
msgstr ""
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr ""
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
#: tables.py:16 tables.py:36
msgid "Edit"
msgstr ""
......@@ -160,11 +200,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr ""
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr ""
......@@ -213,6 +248,7 @@ msgid "Late persons:"
msgstr ""
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr ""
......@@ -221,50 +257,123 @@ msgstr ""
msgid "Tardiness (in m)"
msgstr ""
#: templates/alsijil/class_register/person.html:7
msgid "Class register: person"
msgstr ""
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
#: templates/alsijil/class_register/person.html:19
msgid "Unexcused absences"
msgstr ""
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr ""
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr ""
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr ""
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr ""
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr ""
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr ""
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr ""
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr ""
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr ""
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr ""
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr ""
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
msgid "Groups"
msgstr ""
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr ""
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr ""
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr ""
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr ""
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr ""
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
msgid ""
"\n"
" There are no lessons for the selected group or teacher in this week.\n"
......@@ -332,6 +441,13 @@ msgstr ""
msgid "Substitution"
msgstr ""
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:6
msgid "Class register:"
msgstr ""
......@@ -387,11 +503,6 @@ msgstr ""
msgid "Late"
msgstr ""
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr ""
......@@ -467,18 +578,6 @@ msgstr ""
msgid "Absences and tardiness"
msgstr ""
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr ""
......@@ -506,12 +605,6 @@ msgstr ""
msgid "Yes"
msgstr ""
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:363
msgid "Lesson documentation for week"
msgstr ""
......@@ -524,46 +617,54 @@ msgstr ""
msgid "You either selected an invalid lesson or there is currently no lesson in progress."
msgstr ""
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr ""
#: views.py:116
#: views.py:120
msgid "The lesson documentation has been saved."
msgstr ""
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr ""
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr ""
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr ""
#: views.py:528
msgid "The absence has been marked as excused."
msgstr ""
#: views.py:633
msgid "The absence has been saved."
msgstr ""
#: views.py:488
#: views.py:658
msgid "The extra mark has been created."
msgstr ""
#: views.py:499
#: views.py:669
msgid "The extra mark has been saved."
msgstr ""
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr ""
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr ""
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr ""
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr ""
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-03 20:03+0200\n"
"POT-Creation-Date: 2020-08-21 12:39+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -17,33 +17,37 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: forms.py:25
#: forms.py:26
msgid "Homework for the next lesson"
msgstr ""
#: forms.py:50 templates/alsijil/print/full_register.html:199
#: forms.py:51 templates/alsijil/print/full_register.html:199
msgid "Group"
msgstr ""
#: forms.py:56 templates/alsijil/print/full_register.html:170
#: forms.py:57 templates/alsijil/print/full_register.html:170
#: templates/alsijil/print/full_register.html:201
msgid "Teacher"
msgstr ""
#: forms.py:73
#: forms.py:74
msgid "You can't select a group and a teacher both."
msgstr ""
#: forms.py:101
#: forms.py:100
msgid "Start date"
msgstr ""
#: forms.py:102
#: forms.py:101
msgid "End date"
msgstr ""
#: forms.py:102
msgid "Start period"
msgstr ""
#: forms.py:103
msgid "From period"
msgid "End period"
msgstr ""
#: forms.py:105 templates/alsijil/class_register/lesson.html:163
......@@ -51,19 +55,30 @@ msgid "Person"
msgstr ""
#: forms.py:107 templates/alsijil/class_register/lesson.html:164
#: templates/alsijil/class_register/week_view.html:109
#: templates/alsijil/class_register/person.html:160
#: templates/alsijil/class_register/week_view.html:119
#: templates/alsijil/print/full_register.html:75
#: templates/alsijil/print/full_register.html:312
msgid "Absent"
msgstr ""
#: forms.py:108 templates/alsijil/class_register/lesson.html:166
#: templates/alsijil/class_register/person.html:66
#: templates/alsijil/class_register/person.html:168
#: templates/alsijil/partials/mark_as_buttons.html:2
#: templates/alsijil/partials/mark_as_buttons.html:3
#: templates/alsijil/print/full_register.html:84
#: templates/alsijil/print/full_register.html:275
msgid "Excused"
msgstr ""
#: forms.py:109 templates/alsijil/class_register/lesson.html:170
#: forms.py:110 models.py:37 models.py:68
#: templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
msgstr ""
#: forms.py:115 templates/alsijil/class_register/lesson.html:170
#: templates/alsijil/class_register/lesson.html:223
#: templates/alsijil/class_register/lesson.html:231
#: templates/alsijil/print/full_register.html:314
......@@ -83,15 +98,25 @@ msgid "Current week"
msgstr ""
#: menus.py:28
msgid "My overview"
msgstr ""
#: menus.py:34 templates/alsijil/class_register/persons.html:7
#: templates/alsijil/class_register/persons.html:11
msgid "My students"
msgstr ""
#: menus.py:40 templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Register absence"
msgstr ""
#: menus.py:34 models.py:32 templates/alsijil/excuse_type/list.html:8
#: menus.py:46 models.py:38 templates/alsijil/excuse_type/list.html:8
#: templates/alsijil/excuse_type/list.html:9
msgid "Excuse types"
msgstr ""
#: menus.py:40 models.py:66 models.py:138
#: menus.py:52 models.py:74 models.py:190
#: templates/alsijil/class_register/lesson.html:168
#: templates/alsijil/extra_mark/list.html:8
#: templates/alsijil/extra_mark/list.html:9
......@@ -99,52 +124,51 @@ msgstr ""
msgid "Extra marks"
msgstr ""
#: models.py:18 models.py:124
#: models.py:24 models.py:176
msgid "Short name"
msgstr ""
#: models.py:20 models.py:126
#: models.py:26 models.py:178
msgid "Name"
msgstr ""
#: models.py:31 models.py:60 templates/alsijil/class_register/lesson.html:167
#: templates/alsijil/class_register/lesson.html:202
msgid "Excuse type"
#: models.py:54 models.py:106
msgid "Year"
msgstr ""
#: models.py:75
#: models.py:86
msgid "Personal note"
msgstr ""
#: models.py:76 templates/alsijil/class_register/lesson.html:64
#: models.py:87 templates/alsijil/class_register/lesson.html:64
#: templates/alsijil/class_register/lesson.html:156
#: templates/alsijil/class_register/week_view.html:104
#: templates/alsijil/class_register/week_view.html:112
msgid "Personal notes"
msgstr ""
#: models.py:99 templates/alsijil/class_register/week_view.html:56
#: models.py:112 templates/alsijil/class_register/week_view.html:64
#: templates/alsijil/print/full_register.html:371
msgid "Lesson topic"
msgstr ""
#: models.py:100 templates/alsijil/print/full_register.html:372
#: models.py:113 templates/alsijil/print/full_register.html:372
msgid "Homework"
msgstr ""
#: models.py:102
#: models.py:115
msgid "Group note"
msgstr ""
#: models.py:106 templates/alsijil/class_register/lesson.html:60
#: models.py:158 templates/alsijil/class_register/lesson.html:60
#: templates/alsijil/class_register/lesson.html:143
msgid "Lesson documentation"
msgstr ""
#: models.py:107
#: models.py:159
msgid "Lesson documentations"
msgstr ""
#: models.py:137
#: models.py:189
msgid "Extra mark"
msgstr ""
......@@ -152,6 +176,22 @@ msgstr ""
msgid "Block adding personal notes for cancelled lessons"
msgstr ""
#: preferences.py:25
msgid "Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
msgstr ""
#: preferences.py:28
msgid "This will carry over data only if the data in the following periods are empty."
msgstr ""
#: preferences.py:38
msgid "Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
msgstr ""
#: preferences.py:41
msgid "Lessons in the past are not affected by this setting, you can open them whenever you want."
msgstr ""
#: tables.py:16 tables.py:36
msgid "Edit"
msgstr ""
......@@ -160,11 +200,6 @@ msgstr ""
msgid "Delete"
msgstr ""
#: templates/alsijil/absences/register.html:5
#: templates/alsijil/absences/register.html:6
msgid "Manage absence"
msgstr ""
#: templates/alsijil/class_register/lesson.html:6
msgid "Lesson"
msgstr ""
......@@ -213,6 +248,7 @@ msgid "Late persons:"
msgstr ""
#: templates/alsijil/class_register/lesson.html:165
#: templates/alsijil/class_register/person.html:78
#: templates/alsijil/print/full_register.html:287
msgid "Tardiness"
msgstr ""
......@@ -221,50 +257,123 @@ msgstr ""
msgid "Tardiness (in m)"
msgstr ""
#: templates/alsijil/class_register/person.html:7
msgid "Class register: person"
msgstr ""
#: templates/alsijil/class_register/person.html:11
#, python-format
msgid ""
"\n"
" Class register overview for %(person)s\n"
" "
msgstr ""
#: templates/alsijil/class_register/person.html:19
msgid "Unexcused absences"
msgstr ""
#: templates/alsijil/class_register/person.html:27
#: templates/alsijil/class_register/person.html:40
#: templates/alsijil/class_register/person.html:152
#: templates/alsijil/class_register/person.html:190
msgid "Mark as"
msgstr ""
#: templates/alsijil/class_register/person.html:47
msgid "There are unexcused lessons."
msgstr ""
#: templates/alsijil/class_register/person.html:51
msgid "Statistics on absences, tardiness and remarks"
msgstr ""
#: templates/alsijil/class_register/person.html:60
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/class_register/person.html:64
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/class_register/person.html:74
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/class_register/person.html:94
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/class_register/person.html:110
#, python-format
msgid "Week %(week)s"
msgstr ""
#: templates/alsijil/class_register/person.html:118
#: templates/alsijil/class_register/person.html:127
msgid "Mark all as"
msgstr ""
#: templates/alsijil/class_register/person.html:175
#, python-format
msgid "%(late)s' late"
msgstr ""
#: templates/alsijil/class_register/persons.html:22
msgid "No students available."
msgstr ""
#: templates/alsijil/class_register/week_view.html:6
msgid "Week view"
msgstr ""
#: templates/alsijil/class_register/week_view.html:27
#: templates/alsijil/class_register/week_view.html:30
msgid "Select"
msgstr ""
#: templates/alsijil/class_register/week_view.html:33
#: templates/alsijil/class_register/week_view.html:38
#, python-format
msgid "CW %(week)s: %(instance)s"
msgid ""
"CW %(week)s:\n"
" %(instance)s"
msgstr ""
#: templates/alsijil/class_register/week_view.html:50
#: templates/alsijil/class_register/week_view.html:58
msgid "Period"
msgstr ""
#: templates/alsijil/class_register/week_view.html:52
#: templates/alsijil/class_register/week_view.html:60
msgid "Groups"
msgstr ""
#: templates/alsijil/class_register/week_view.html:54
#: templates/alsijil/class_register/week_view.html:62
#: templates/alsijil/print/full_register.html:169
#: templates/alsijil/print/full_register.html:200
msgid "Subject"
msgstr ""
#: templates/alsijil/class_register/week_view.html:55
#: templates/alsijil/class_register/week_view.html:63
msgid "Teachers"
msgstr ""
#: templates/alsijil/class_register/week_view.html:110
#: templates/alsijil/class_register/week_view.html:120
msgid "unexcused"
msgstr ""
#: templates/alsijil/class_register/week_view.html:113
#: templates/alsijil/class_register/week_view.html:123
msgid "Summed up tardiness"
msgstr ""
#: templates/alsijil/class_register/week_view.html:142
#: templates/alsijil/class_register/week_view.html:152
msgid "No lessons available"
msgstr ""
#: templates/alsijil/class_register/week_view.html:145
#: templates/alsijil/class_register/week_view.html:155
msgid ""
"\n"
" There are no lessons for the selected group or teacher in this week.\n"
......@@ -332,6 +441,13 @@ msgstr ""
msgid "Substitution"
msgstr ""
#: templates/alsijil/partials/mark_as_buttons.html:4
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:6
msgid "Class register:"
msgstr ""
......@@ -387,11 +503,6 @@ msgstr ""
msgid "Late"
msgstr ""
#: templates/alsijil/print/full_register.html:81
#: templates/alsijil/print/full_register.html:283
msgid "Unexcused"
msgstr ""
#: templates/alsijil/print/full_register.html:89
msgid "Custom excuse types"
msgstr ""
......@@ -467,18 +578,6 @@ msgstr ""
msgid "Absences and tardiness"
msgstr ""
#: templates/alsijil/print/full_register.html:269
msgid "Absences"
msgstr ""
#: templates/alsijil/print/full_register.html:274
msgid "thereof"
msgstr ""
#: templates/alsijil/print/full_register.html:304
msgid "Relevant personal notes"
msgstr ""
#: templates/alsijil/print/full_register.html:308
msgid "Date"
msgstr ""
......@@ -506,12 +605,6 @@ msgstr ""
msgid "Yes"
msgstr ""
#: templates/alsijil/print/full_register.html:335
#: templates/alsijil/print/full_register.html:424
#: templates/alsijil/print/full_register.html:439
msgid "e"
msgstr ""
#: templates/alsijil/print/full_register.html:363
msgid "Lesson documentation for week"
msgstr ""
......@@ -524,46 +617,54 @@ msgstr ""
msgid "You either selected an invalid lesson or there is currently no lesson in progress."
msgstr ""
#: views.py:90
#: views.py:94
msgid "You are not allowed to create a lesson documentation for a lesson in the future."
msgstr ""
#: views.py:116
#: views.py:120
msgid "The lesson documentation has been saved."
msgstr ""
#: views.py:136
#: views.py:140
msgid "The personal notes have been saved."
msgstr ""
#: views.py:327
#: views.py:348
msgid "There is no current school term."
msgstr ""
#: views.py:463
#: views.py:513
msgid "The absences have been marked as excused."
msgstr ""
#: views.py:528
msgid "The absence has been marked as excused."
msgstr ""
#: views.py:633
msgid "The absence has been saved."
msgstr ""
#: views.py:488
#: views.py:658
msgid "The extra mark has been created."
msgstr ""
#: views.py:499
#: views.py:669
msgid "The extra mark has been saved."
msgstr ""
#: views.py:509
#: views.py:679
msgid "The extra mark has been deleted."
msgstr ""
#: views.py:529
#: views.py:699
msgid "The excuse type has been created."
msgstr ""
#: views.py:540
#: views.py:710
msgid "The excuse type has been saved."
msgstr ""
#: views.py:550
#: views.py:720
msgid "The excuse type has been deleted."
msgstr ""
......@@ -24,6 +24,18 @@ MENUS = {
"icon": "view_week",
"validators": ["menu_generator.validators.is_authenticated"],
},
{
"name": _("My overview"),
"url": "overview_me",
"icon": "insert_chart",
"validators": ["menu_generator.validators.is_authenticated"],
},
{
"name": _("My students"),
"url": "my_students",
"icon": "people",
"validators": ["menu_generator.validators.is_authenticated"],
},
{
"name": _("Register absence"),
"url": "register_absence",
......
# Generated by Django 3.0.9 on 2020-08-15 09:39
from django.db import migrations, models
import aleksis.apps.chronos.util.date
def migrate_data(apps, schema_editor):
PersonalNote = apps.get_model("alsijil", "PersonalNote")
LessonDocumentation = apps.get_model("alsijil", "LessonDocumentation")
db_alias = schema_editor.connection.alias
for note in PersonalNote.objects.using(db_alias).all():
year = note.lesson_period.lesson.validity.date_start.year
if note.week < int(
note.lesson_period.lesson.validity.date_start.strftime("%V")
):
year += 1
note.year = year
note.save()
for doc in LessonDocumentation.objects.using(db_alias).all():
year = doc.lesson_period.lesson.validity.date_start.year
if doc.week < int(doc.lesson_period.lesson.validity.date_start.strftime("%V")):
year += 1
doc.year = year
doc.save()
class Migration(migrations.Migration):
dependencies = [
("alsijil", "0006_delete_personal_notes_filter"),
]
operations = [
migrations.AddField(
model_name="lessondocumentation",
name="year",
field=models.IntegerField(
default=aleksis.apps.chronos.util.date.get_current_year,
verbose_name="Year",
),
),
migrations.AddField(
model_name="personalnote",
name="year",
field=models.IntegerField(
default=aleksis.apps.chronos.util.date.get_current_year,
verbose_name="Year",
),
),
migrations.RunPython(migrate_data),
]
......@@ -3,6 +3,7 @@ from typing import Dict, Optional, Union
from django.db.models import Exists, OuterRef, QuerySet
import reversion
from calendarweek import CalendarWeek
from aleksis.apps.chronos.models import LessonPeriod
......@@ -20,6 +21,7 @@ def mark_absent(
excused: bool = False,
excuse_type: Optional[ExcuseType] = None,
remarks: str = "",
to_period: Optional[int] = None,
):
"""Mark a person absent for all lessons in a day, optionally starting with a selected period number.
......@@ -39,22 +41,31 @@ def mark_absent(
period__period__gte=from_period
)
if to_period:
lesson_periods = lesson_periods.filter(period__period__lte=to_period)
# Create and update all personal notes for the discovered lesson periods
for lesson_period in lesson_periods:
personal_note, created = PersonalNote.objects.update_or_create(
person=self,
lesson_period=lesson_period,
week=wanted_week.week,
defaults={"absent": absent, "excused": excused, "excuse_type": excuse_type},
)
personal_note.groups_of_person.set(self.member_of.all())
with reversion.create_revision():
personal_note, created = PersonalNote.objects.update_or_create(
person=self,
lesson_period=lesson_period,
week=wanted_week.week,
year=wanted_week.year,
defaults={
"absent": absent,
"excused": excused,
"excuse_type": excuse_type,
},
)
personal_note.groups_of_person.set(self.member_of.all())
if remarks:
if personal_note.remarks:
personal_note.remarks += "; %s" % remarks
else:
personal_note.remarks = remarks
personal_note.save()
if remarks:
if personal_note.remarks:
personal_note.remarks += "; %s" % remarks
else:
personal_note.remarks = remarks
personal_note.save()
@LessonPeriod.method
......@@ -74,7 +85,10 @@ def get_personal_notes(self, wanted_week: CalendarWeek):
missing_persons = Person.objects.annotate(
no_personal_notes=~Exists(
PersonalNote.objects.filter(
week=wanted_week.week, lesson_period=self, person__pk=OuterRef("pk")
week=wanted_week.week,
year=wanted_week.year,
lesson_period=self,
person__pk=OuterRef("pk"),
)
)
).filter(
......@@ -85,7 +99,12 @@ def get_personal_notes(self, wanted_week: CalendarWeek):
# Create all missing personal notes
new_personal_notes = [
PersonalNote(person=person, lesson_period=self, week=wanted_week.week)
PersonalNote(
person=person,
lesson_period=self,
week=wanted_week.week,
year=wanted_week.year,
)
for person in missing_persons
]
PersonalNote.objects.bulk_create(new_personal_notes)
......@@ -94,7 +113,7 @@ def get_personal_notes(self, wanted_week: CalendarWeek):
personal_note.groups_of_person.set(personal_note.person.member_of.all())
return PersonalNote.objects.select_related("person").filter(
lesson_period=self, week=wanted_week.week
lesson_period=self, week=wanted_week.week, year=wanted_week.year
)
......@@ -106,7 +125,9 @@ def get_lesson_documentation(
if not week:
week = self.week
try:
return LessonDocumentation.objects.get(lesson_period=self, week=week.week)
return LessonDocumentation.objects.get(
lesson_period=self, week=week.week, year=week.year
)
except LessonDocumentation.DoesNotExist:
return None
......@@ -119,7 +140,7 @@ def get_or_create_lesson_documentation(
if not week:
week = self.week
lesson_documentation, created = LessonDocumentation.objects.get_or_create(
lesson_period=self, week=week.week
lesson_period=self, week=week.week, year=week.year
)
return lesson_documentation
......@@ -129,7 +150,7 @@ def get_absences(self, week: Optional[CalendarWeek] = None) -> QuerySet:
"""Get all personal notes of absent persons for this lesson."""
if not week:
week = self.week
return self.personal_notes.filter(week=week.week, absent=True)
return self.personal_notes.filter(week=week.week, year=week.year, absent=True)
@LessonPeriod.method
......@@ -137,7 +158,9 @@ def get_excused_absences(self, week: Optional[CalendarWeek] = None) -> QuerySet:
"""Get all personal notes of excused absent persons for this lesson."""
if not week:
week = self.week
return self.personal_notes.filter(week=week.week, absent=True, excused=True)
return self.personal_notes.filter(
week=week.week, year=week.year, absent=True, excused=True
)
@LessonPeriod.method
......@@ -145,7 +168,9 @@ def get_unexcused_absences(self, week: Optional[CalendarWeek] = None) -> QuerySe
"""Get all personal notes of unexcused absent persons for this lesson."""
if not week:
week = self.week
return self.personal_notes.filter(week=week.week, absent=True, excused=False)
return self.personal_notes.filter(
week=week.week, year=week.year, absent=True, excused=False
)
@LessonPeriod.method
......@@ -153,7 +178,7 @@ def get_tardinesses(self, week: Optional[CalendarWeek] = None) -> QuerySet:
"""Get all personal notes of late persons for this lesson."""
if not week:
week = self.week
return self.personal_notes.filter(week=week.week, late__gt=0)
return self.personal_notes.filter(week=week.week, year=week.year, late__gt=0)
@LessonPeriod.method
......@@ -166,7 +191,9 @@ def get_extra_marks(
stats = {}
for extra_mark in ExtraMark.objects.all():
qs = self.personal_notes.filter(week=week.week, extra_marks=extra_mark)
qs = self.personal_notes.filter(
week=week.week, year=week.year, extra_marks=extra_mark
)
if qs:
stats[extra_mark] = qs
......
from django.db import models
from django.utils.formats import date_format
from django.utils.translation import gettext_lazy as _
from calendarweek import CalendarWeek
from aleksis.apps.chronos.mixins import WeekRelatedMixin
from aleksis.apps.chronos.models import LessonPeriod
from aleksis.apps.chronos.util.date import get_current_year
from aleksis.core.mixins import ExtensibleModel
from aleksis.core.util.core_helpers import get_site_preferences
def isidentifier(value: str) -> bool:
......@@ -32,7 +39,7 @@ class ExcuseType(ExtensibleModel):
verbose_name_plural = _("Excuse types")
class PersonalNote(ExtensibleModel):
class PersonalNote(ExtensibleModel, WeekRelatedMixin):
"""A personal note about a single person.
Used in the class register to note absences, excuses
......@@ -45,6 +52,8 @@ class PersonalNote(ExtensibleModel):
groups_of_person = models.ManyToManyField("core.Group", related_name="+")
week = models.IntegerField()
year = models.IntegerField(verbose_name=_("Year"), default=get_current_year)
lesson_period = models.ForeignKey(
"chronos.LessonPeriod", models.CASCADE, related_name="personal_notes"
)
......@@ -69,14 +78,36 @@ class PersonalNote(ExtensibleModel):
def save(self, *args, **kwargs):
if self.excuse_type:
self.excused = True
if not self.absent:
self.excused = False
self.excuse_type = None
super().save(*args, **kwargs)
def reset_values(self):
"""Reset all saved data to default values.
.. warning ::
This won't save the data, please execute ``save`` extra.
"""
defaults = PersonalNote()
self.absent = defaults.absent
self.late = defaults.late
self.excused = defaults.excused
self.excuse_type = defaults.excuse_type
self.remarks = defaults.remarks
self.extra_marks.clear()
def __str__(self):
return f"{date_format(self.date)}, {self.lesson_period}, {self.person}"
class Meta:
verbose_name = _("Personal note")
verbose_name_plural = _("Personal notes")
unique_together = [["lesson_period", "week", "person"]]
ordering = [
"lesson_period__lesson__validity__date_start",
"year",
"week",
"lesson_period__period__weekday",
"lesson_period__period__period",
......@@ -85,13 +116,15 @@ class PersonalNote(ExtensibleModel):
]
class LessonDocumentation(ExtensibleModel):
class LessonDocumentation(ExtensibleModel, WeekRelatedMixin):
"""A documentation on a single lesson period.
Non-personal, includes the topic and homework of the lesson.
"""
week = models.IntegerField()
year = models.IntegerField(verbose_name=_("Year"), default=get_current_year)
lesson_period = models.ForeignKey(
"chronos.LessonPeriod", models.CASCADE, related_name="documentations"
)
......@@ -102,12 +135,51 @@ class LessonDocumentation(ExtensibleModel):
verbose_name=_("Group note"), max_length=200, blank=True
)
def _carry_over_data(self):
"""Carry over data to directly adjacent periods in this lesson if data is not already set.
Can be deactivated using site preference ``alsijil__carry_over``.
"""
following_periods = LessonPeriod.objects.filter(
lesson=self.lesson_period.lesson,
period__weekday=self.lesson_period.period.weekday,
period__period__gt=self.lesson_period.period.period,
)
for period in following_periods:
lesson_documentation = period.get_or_create_lesson_documentation(
CalendarWeek(week=self.week, year=self.year)
)
changed = False
if not lesson_documentation.topic:
lesson_documentation.topic = self.topic
changed = True
if not lesson_documentation.homework:
lesson_documentation.homework = self.homework
changed = True
if not lesson_documentation.group_note:
lesson_documentation.group_note = self.group_note
changed = True
if changed:
lesson_documentation.save()
def save(self, *args, **kwargs):
if get_site_preferences()["alsijil__carry_over"] and (
self.topic or self.homework or self.group_note
):
self._carry_over_data()
super().save(*args, **kwargs)
class Meta:
verbose_name = _("Lesson documentation")
verbose_name_plural = _("Lesson documentations")
unique_together = [["lesson_period", "week"]]
ordering = [
"lesson_period__lesson__validity__date_start",
"year",
"week",
"lesson_period__period__weekday",
"lesson_period__period__period",
......
......@@ -14,3 +14,29 @@ class BlockPersonalNotesForCancelled(BooleanPreference):
name = "block_personal_notes_for_cancelled"
default = True
verbose_name = _("Block adding personal notes for cancelled lessons")
@site_preferences_registry.register
class CarryOverDataToNextPeriods(BooleanPreference):
section = alsijil
name = "carry_over"
default = True
verbose_name = _(
"Carry over data from first lesson period to the following lesson periods in lessons over multiple periods"
)
help_text = _(
"This will carry over data only if the data in the following periods are empty."
)
@site_preferences_registry.register
class AllowOpenPeriodsOnSameDay(BooleanPreference):
section = alsijil
name = "open_periods_same_day"
default = False
verbose_name = _(
"Allow teachers to open lesson periods on the same day and not just at the beginning of the period"
)
help_text = _(
"Lessons in the past are not affected by this setting, you can open them whenever you want."
)
......@@ -2,8 +2,8 @@
{% extends "core/base.html" %}
{% load material_form i18n static %}
{% block browser_title %}{% blocktrans %}Manage absence{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}Manage absence{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Register absence{% endblocktrans %}{% endblock %}
{% block page_title %}{% blocktrans %}Register absence{% endblocktrans %}{% endblock %}
{% block content %}
......@@ -13,4 +13,12 @@
{% include "core/partials/save_button.html" %}
</form>
<script>
$(document).ready(function () {
$("#id_date_start").change(function () {
$("#id_date_end").val($("#id_date_start").val());
$("#id_date_end").change();
});
});
</script>
{% endblock %}
{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% load data_helpers %}
{% load week_helpers %}
{% load i18n %}
{% block browser_title %}{% blocktrans %}Class register: person{% endblocktrans %}{% endblock %}
{% block page_title %}
{% blocktrans with person=person %}
Class register overview for {{ person }}
{% endblocktrans %}
{% endblock %}
{% block content %}
<div class="row">
<div class="col s12 m12 l6">
<h5>{% trans "Unexcused absences" %}</h5>
<ul class="collection">
{% for note in unexcused_absences %}
{% weekday_to_date note.calendar_week note.lesson_period.period.weekday as note_date %}
<li class="collection-item">
<form action="" method="post" class="right hide-on-small-only" style="margin-top: -7px;">
{% csrf_token %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
{% include "alsijil/partials/mark_as_buttons.html" %}
<a class="btn-flat red-text" title="{% trans "Delete note" %}"
href="{% url "delete_personal_note" note.pk %}">
<i class="material-icons center">cancel</i>
</a>
</form>
<i class="material-icons left red-text">warning</i>
<p class="no-margin">
<a href="{% url "lesson_by_week_and_period" note.year note.week note.lesson_period.pk %}">{{ note_date }}, {{ note.lesson_period }}</a>
</p>
{% if note.remarks %}
<p class="no-margin"><em>{{ note.remarks }}</em></p>
{% endif %}
<form action="" method="post" class="hide-on-med-and-up">
{% csrf_token %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
{% include "alsijil/partials/mark_as_buttons.html" %}
<a class="btn-flat red-text" title="{% trans "Delete note" %}"
href="{% url "delete_personal_note" note.pk %}">
<i class="material-icons center">cancel</i>
</a>
</form>
</li>
{% empty %}
<li class="collection-item flow-text">
{% trans "There are unexcused lessons." %}
</li>
{% endfor %}
</ul>
<h5>{% trans "Statistics on absences, tardiness and remarks" %}</h5>
<ul class="collapsible">
{% for school_term, stat in stats %}
<li {% if forloop.first %}class="active"{% endif %}>
<div class="collapsible-header">
<i class="material-icons">date_range</i>{{ school_term }}</div>
<div class="collapsible-body">
<table>
<tr>
<th colspan="2">{% trans 'Absences' %}</th>
<td>{{ stat.absences_count }}</td>
</tr>
<tr>
<td rowspan="{{ excuse_types.count|add:2 }}" class="hide-on-small-only">{% trans "thereof" %}</td>
<td rowspan="{{ excuse_types.count|add:2 }}" class="hide-on-med-and-up"></td>
<th class="truncate">{% trans 'Excused' %}</th>
<td>{{ stat.excused }}</td>
</tr>
{% for excuse_type in excuse_types %}
<th>{{ excuse_type.name }}</th>
<td>{{ stat|get_dict:excuse_type.count_label }}</td>
{% endfor %}
<tr>
<th>{% trans 'Unexcused' %}</th>
<td>{{ stat.unexcused }}</td>
</tr>
<tr>
<th colspan="2">{% trans 'Tardiness' %}</th>
<td>{{ stat.tardiness }}'</td>
</tr>
{% for extra_mark in extra_marks %}
<tr>
<th colspan="2">{{ extra_mark.name }}</th>
<td>{{ stat|get_dict:extra_mark.count_label }}</td>
</tr>
{% endfor %}
</table>
</div>
</li>
{% endfor %}
</ul>
</div>
<div class="col s12 m12 l6">
<h5>{% trans "Relevant personal notes" %}</h5>
<ul class="collapsible">
<li>
<div>
<ul>
{% for note in personal_notes %}
{% ifchanged note.lesson_period.lesson.validity.school_term %}</ul></div></li>
<li {% if forloop.first %}class="active"{% endif %}>
<div class="collapsible-header"><i
class="material-icons">date_range</i>{{ note.lesson_period.lesson.validity.school_term }}</div>
<div class="collapsible-body">
<ul class="collection">
{% endifchanged %}
{% ifchanged note.week %}
<li class="collection-item">
<strong>{% blocktrans with week=note.week %}Week {{ week }}{% endblocktrans %}</strong>
</li>
{% endifchanged %}
{% weekday_to_date note.calendar_week note.lesson_period.period.weekday as note_date %}
{% ifchanged note_date %}
<li class="collection-item">
<form action="" method="post" class="right hide-on-small-only" style="margin-top: -7px;">
{% csrf_token %}
{% trans "Mark all as" %}
<input type="hidden" value="{{ note_date|date:"Y-m-d" }}" name="date">
{% include "alsijil/partials/mark_as_buttons.html" %}
</form>
<i class="material-icons left">schedule</i>
{{ note_date }}
<form action="" method="post" class="hide-on-med-and-up">
{% csrf_token %}
{% trans "Mark all as" %}
<input type="hidden" value="{{ note_date|date:"Y-m-d" }}" name="date">
{% include "alsijil/partials/mark_as_buttons.html" %}
</form>
</li>
{% endifchanged %}
<li class="collection-item">
<div class="row no-margin">
<div class="col s2 m1">
{{ note.lesson_period.period.period }}.
</div>
<div class="col s10 m4">
<i class="material-icons left">event_note</i>
<a href="{% url "lesson_by_week_and_period" note.year note.week note.lesson_period.pk %}">
{{ note.lesson_period.get_subject.name }}<br/>
{{ note.lesson_period.get_teacher_names }}
</a>
</div>
<div class="col s12 m7 no-padding">
{% if note.absent and not note.excused %}
<form action="" method="post" class="right hide-on-small-only" style="margin-top: -7px;">
{% csrf_token %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
{% include "alsijil/partials/mark_as_buttons.html" %}
<a class="btn-flat red-text" title="{% trans "Delete note" %}"
href="{% url "delete_personal_note" note.pk %}">
<i class="material-icons center">cancel</i>
</a>
</form>
{% endif %}
{% if note.absent %}
<div class="chip red white-text">
{% trans 'Absent' %}
</div>
{% endif %}
{% if note.excused %}
<div class="chip green white-text">
{% if note.excuse_type %}
{{ note.excuse_type.name }}
{% else %}
{% trans 'Excused' %}
{% endif %}
</div>
{% endif %}
{% if note.late %}
<div class="chip orange white-text">
{% blocktrans with late=note.late %}{{ late }}' late{% endblocktrans %}
</div>
{% endif %}
{% for extra_mark in note.extra_marks.all %}
<div class="chip">{{ extra_mark.name }}</div>
{% endfor %}
<em>{{ note.remarks }}</em>
</div>
<div class="col s12 hide-on-med-and-up">
{% if note.absent and not note.excused %}
<form action="" method="post">
{% csrf_token %}
{% trans "Mark as" %}
<input type="hidden" value="{{ note.pk }}" name="personal_note">
{% include "alsijil/partials/mark_as_buttons.html" %}
<a class="btn-flat red-text" title="{% trans "Delete note" %}"
href="{% url "delete_personal_note" note.pk %}">
<i class="material-icons center">cancel</i>
</a>
</form>
{% endif %}
</div>
</li>
{% endfor %}
</li>
</ul>
</div>
</div>
{% endblock %}
{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% load data_helpers %}
{% load week_helpers %}
{% load i18n %}
{% block browser_title %}{% blocktrans %}My students{% endblocktrans %}{% endblock %}
{% block page_title %}
{% blocktrans %}My students{% endblocktrans %}
{% endblock %}
{% block content %}
<div class="collection">
{% for person in persons %}
<a class="collection-item" href="{% url "overview_person" person.pk %}">
{{ person }}
</a>
{% empty %}
<li class="collection-item flow-text">
{% blocktrans %}No students available.{% endblocktrans %}
</li>
{% endfor %}
</div>
{% endblock %}
......@@ -35,7 +35,8 @@
<div class="row">
<h4 class="col s12 m6">{% blocktrans with el=el week=week.week %}CW {{ week }}: {{ instance }}{% endblocktrans %} </h4>
<h4 class="col s12 m6">{% blocktrans with el=el week=week.week %}CW {{ week }}:
{{ instance }}{% endblocktrans %} </h4>
{% include "chronos/partials/week_select.html" with wanted_week=week %}
</div>
......@@ -111,7 +112,9 @@
{% blocktrans %}Personal notes{% endblocktrans %}
</span>
{% for person in persons %}
<h5 class="card-title">{{ person.person.full_name }}</h5>
<h5 class="card-title">
<a href="{% url "overview_person" person.person.pk %}">{{ person.person.full_name }}</a>
</h5>
<p class="card-text">
{% trans "Absent" %}: {{ person.person.absences_count }}
({{ person.person.unexcused_count }} {% trans "unexcused" %})
......
{% load i18n %}
<button type="submit" class="btn-flat tooltipped" name="excuse_type" value="e" title="{% trans "Excused" %}"
data-position="bottom" data-tooltip="{% trans "Excused" %}" style="width: 50px;">
{% trans "e" %}
</button>
{% for excuse_type in excuse_types %}
<button type="submit" class="btn-flat tooltipped" value="{{ excuse_type.pk }}" name="excuse_type"
title="{{ excuse_type.name }}" data-position="bottom" data-tooltip="{{ excuse_type.name }}"
style="width: 50px;">
{{ excuse_type.short_name }}
</button>
{% endfor %}
......@@ -319,7 +319,7 @@
{% for note in person.personal_notes.all %}
{% if note.lesson_period in lesson_periods %}
{% if note.absent or note.late or note.remarks or note.extra_marks.all %}
{% period_to_date note.week note.lesson_period.period as note_date %}
{% weekday_to_date note.calendar_week note.lesson_period.period.weekday as note_date %}
<tr>
<td>{{ note_date }}</td>
<td>{{ note.lesson_period.period.period }}</td>
......
......@@ -26,6 +26,14 @@ urlpatterns = [
path(
"print/group/<int:id_>", views.full_register_group, name="full_register_group"
),
path("persons/", views.my_students, name="my_students"),
path("persons/<int:id_>/", views.overview_person, name="overview_person"),
path("me/", views.overview_person, name="overview_me"),
path(
"notes/<int:pk>/delete/",
views.DeletePersonalNoteView.as_view(),
name="delete_personal_note",
),
path("absence/new", views.register_absence, name="register_absence"),
path("extra_marks/", views.ExtraMarkListView.as_view(), name="extra_marks"),
path(
......
......@@ -7,20 +7,22 @@ from django.http import Http404, HttpRequest, HttpResponse, HttpResponseNotFound
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse, reverse_lazy
from django.utils.translation import ugettext as _
from django.views.generic import DetailView
import reversion
from calendarweek import CalendarWeek
from django_tables2 import SingleTableView
from reversion.views import RevisionMixin
from rules.contrib.views import PermissionRequiredMixin
from aleksis.apps.chronos.managers import TimetableType
from aleksis.apps.chronos.models import LessonPeriod
from aleksis.apps.chronos.models import LessonPeriod, TimePeriod
from aleksis.apps.chronos.util.chronos_helpers import get_el_by_pk
from aleksis.apps.chronos.util.date import get_weeks_for_year, week_weekday_to_date
from aleksis.core.mixins import AdvancedCreateView, AdvancedDeleteView, AdvancedEditView
from aleksis.core.models import Group, Person, SchoolTerm
from aleksis.core.util import messages
from aleksis.core.util.core_helpers import get_site_preferences
from aleksis.core.util.core_helpers import get_site_preferences, objectgetter_optional
from .forms import (
ExcuseTypeForm,
......@@ -30,7 +32,7 @@ from .forms import (
RegisterAbsenceForm,
SelectForm,
)
from .models import ExcuseType, ExtraMark, LessonDocumentation
from .models import ExcuseType, ExtraMark, LessonDocumentation, PersonalNote
from .tables import ExcuseTypeTable, ExtraMarkTable
......@@ -83,6 +85,10 @@ def lesson(
wanted_week[lesson_period.period.weekday], lesson_period.period.time_start,
)
> datetime.now()
and not (
get_site_preferences()["alsijil__open_periods_same_day"]
and wanted_week[lesson_period.period.weekday] <= datetime.now().date()
)
and not request.user.is_superuser
):
raise PermissionDenied(
......@@ -121,7 +127,8 @@ def lesson(
or not get_site_preferences()["alsijil__block_personal_notes_for_cancelled"]
):
if personal_note_formset.is_valid():
instances = personal_note_formset.save()
with reversion.create_revision():
instances = personal_note_formset.save()
# Iterate over personal notes and carry changed absences to following lessons
for instance in instances:
......@@ -164,7 +171,10 @@ def week_view(
lesson_periods = LessonPeriod.objects.annotate(
has_documentation=Exists(
LessonDocumentation.objects.filter(
~Q(topic__exact=""), lesson_period=OuterRef("pk"), week=wanted_week.week
~Q(topic__exact=""),
lesson_period=OuterRef("pk"),
week=wanted_week.week,
year=wanted_week.year,
)
)
).in_week(wanted_week)
......@@ -234,6 +244,7 @@ def week_view(
filter=Q(
personal_notes__lesson_period__in=lesson_periods_pk,
personal_notes__week=wanted_week.week,
personal_notes__year=wanted_week.year,
personal_notes__absent=True,
),
distinct=True,
......@@ -243,6 +254,7 @@ def week_view(
filter=Q(
personal_notes__lesson_period__in=lesson_periods_pk,
personal_notes__week=wanted_week.week,
personal_notes__year=wanted_week.year,
personal_notes__absent=True,
personal_notes__excused=False,
),
......@@ -253,6 +265,7 @@ def week_view(
pk=OuterRef("pk"),
personal_notes__lesson_period__in=lesson_periods_pk,
personal_notes__week=wanted_week.week,
personal_notes__year=wanted_week.year,
)
.distinct()
.annotate(tardiness_sum=Sum("personal_notes__late"))
......@@ -269,6 +282,7 @@ def week_view(
filter=Q(
personal_notes__lesson_period__in=lesson_periods_pk,
personal_notes__week=wanted_week.week,
personal_notes__year=wanted_week.year,
personal_notes__extra_marks=extra_mark,
),
distinct=True,
......@@ -282,7 +296,9 @@ def week_view(
{
"person": person,
"personal_notes": person.personal_notes.filter(
week=wanted_week.week, lesson_period__in=lesson_periods_pk
week=wanted_week.week,
year=wanted_week.year,
lesson_period__in=lesson_periods_pk,
),
}
)
......@@ -358,17 +374,17 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse:
):
documentations = list(
filter(
lambda d: d.week == week.week,
lambda d: d.week == week.week and d.year == week.year,
lesson_period.documentations.all(),
)
)
notes = list(
filter(
lambda d: d.week == week.week,
lambda d: d.week == week.week and d.year == week.year,
lesson_period.personal_notes.all(),
)
)
substitution = lesson_period.get_substitution(week.week)
substitution = lesson_period.get_substitution(week)
periods_by_day.setdefault(day, []).append(
(lesson_period, documentations, notes, substitution)
......@@ -445,6 +461,147 @@ def full_register_group(request: HttpRequest, id_: int) -> HttpResponse:
return render(request, "alsijil/print/full_register.html", context)
def my_students(request: HttpRequest) -> HttpResponse:
context = {}
relevant_groups = (
Group.objects.for_current_school_term_or_all()
.annotate(lessons_count=Count("lessons"))
.filter(lessons_count__gt=0, owners=request.user.person)
)
persons = Person.objects.filter(member_of__in=relevant_groups)
context["persons"] = persons
return render(request, "alsijil/class_register/persons.html", context)
def overview_person(request: HttpRequest, id_: Optional[int] = None) -> HttpResponse:
context = {}
person = objectgetter_optional(
Person, default="request.user.person", default_eval=True
)(request, id_)
context["person"] = person
if request.method == "POST":
if request.POST.get("excuse_type"):
# Get excuse type
excuse_type = request.POST["excuse_type"]
found = False
if excuse_type == "e":
excuse_type = None
found = True
else:
try:
excuse_type = ExcuseType.objects.get(pk=int(excuse_type))
found = True
except (ExcuseType.DoesNotExist, ValueError):
pass
if found:
if request.POST.get("date"):
# Mark absences on date as excused
try:
date = datetime.strptime(
request.POST["date"], "%Y-%m-%d"
).date()
notes = person.personal_notes.filter(
week=date.isocalendar()[1],
lesson_period__period__weekday=date.weekday(),
lesson_period__lesson__validity__date_start__lte=date,
lesson_period__lesson__validity__date_end__gte=date,
absent=True,
excused=False,
)
for note in notes:
note.excused = True
note.excuse_type = excuse_type
with reversion.create_revision():
note.save()
messages.success(
request, _("The absences have been marked as excused.")
)
except ValueError:
pass
elif request.POST.get("personal_note"):
# Mark specific absence as excused
try:
note = PersonalNote.objects.get(
pk=int(request.POST["personal_note"])
)
if note.absent:
note.excused = True
note.excuse_type = excuse_type
with reversion.create_revision():
note.save()
messages.success(
request, _("The absence has been marked as excused.")
)
except (PersonalNote.DoesNotExist, ValueError):
pass
person.refresh_from_db()
unexcused_absences = person.personal_notes.filter(absent=True, excused=False)
context["unexcused_absences"] = unexcused_absences
personal_notes = person.personal_notes.filter(
Q(absent=True) | Q(late__gt=0) | ~Q(remarks="") | Q(extra_marks__isnull=False)
).order_by(
"-lesson_period__lesson__validity__date_start",
"-week",
"lesson_period__period__weekday",
"lesson_period__period__period",
)
context["personal_notes"] = personal_notes
context["excuse_types"] = ExcuseType.objects.all()
school_terms = SchoolTerm.objects.all().order_by("-date_start")
stats = []
for school_term in school_terms:
stat = {}
personal_notes = PersonalNote.objects.filter(
person=person, lesson_period__lesson__validity__school_term=school_term
)
if not personal_notes.exists():
continue
stat.update(
personal_notes.filter(absent=True).aggregate(absences_count=Count("absent"))
)
stat.update(
personal_notes.filter(
absent=True, excused=True, excuse_type__isnull=True
).aggregate(excused=Count("absent"))
)
stat.update(
personal_notes.filter(absent=True, excused=False).aggregate(
unexcused=Count("absent")
)
)
stat.update(personal_notes.aggregate(tardiness=Sum("late")))
for extra_mark in ExtraMark.objects.all():
stat.update(
personal_notes.filter(extra_marks=extra_mark).aggregate(
**{extra_mark.count_label: Count("pk")}
)
)
for excuse_type in ExcuseType.objects.all():
stat.update(
personal_notes.filter(absent=True, excuse_type=excuse_type).aggregate(
**{excuse_type.count_label: Count("absent")}
)
)
stats.append((school_term, stat))
context["stats"] = stats
context["excuse_types"] = ExcuseType.objects.all()
context["extra_marks"] = ExtraMark.objects.all()
return render(request, "alsijil/class_register/person.html", context)
def register_absence(request: HttpRequest) -> HttpResponse:
context = {}
......@@ -457,25 +614,52 @@ def register_absence(request: HttpRequest) -> HttpResponse:
start_date = register_absence_form.cleaned_data["date_start"]
end_date = register_absence_form.cleaned_data["date_end"]
from_period = register_absence_form.cleaned_data["from_period"]
to_period = register_absence_form.cleaned_data["to_period"]
absent = register_absence_form.cleaned_data["absent"]
excused = register_absence_form.cleaned_data["excused"]
excuse_type = register_absence_form.cleaned_data["excuse_type"]
remarks = register_absence_form.cleaned_data["remarks"]
# Mark person as absent
delta = end_date - start_date
for i in range(delta.days + 1):
from_period = from_period if i == 0 else 0
from_period_on_day = from_period if i == 0 else TimePeriod.period_min
to_period_on_day = (
to_period if i == delta.days else TimePeriod.period_max
)
day = start_date + timedelta(days=i)
person.mark_absent(day, from_period, absent, excused, remarks)
person.mark_absent(
day,
from_period_on_day,
absent,
excused,
excuse_type,
remarks,
to_period_on_day,
)
messages.success(request, _("The absence has been saved."))
return redirect("index")
return redirect("register_absence")
context["register_absence_form"] = register_absence_form
return render(request, "alsijil/absences/register.html", context)
class DeletePersonalNoteView(DetailView):
model = PersonalNote
template_name = "core/pages/delete.html"
def post(self, request, *args, **kwargs):
note = self.get_object()
with reversion.create_revision():
note.reset_values()
note.save()
messages.success(request, _("The personal note has been deleted."))
return redirect("overview_person", note.person.pk)
class ExtraMarkListView(SingleTableView, PermissionRequiredMixin):
"""Table of all extra marks."""
......