Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
15071c7d
Verified
Commit
15071c7d
authored
5 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Patches
Plain Diff
Rewrite code to set remark.
parent
4d28851e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/alsijil/model_extensions.py
+9
-3
9 additions, 3 deletions
biscuit/apps/alsijil/model_extensions.py
with
9 additions
and
3 deletions
biscuit/apps/alsijil/model_extensions.py
+
9
−
3
View file @
15071c7d
...
...
@@ -36,17 +36,23 @@ def mark_absent(self, day: date, starting_period: Optional[int] = 0, absent=True
# Create and update all personal notes for the discovered lesson periods
for
lesson_period
in
lesson_periods
:
PersonalNote
.
objects
.
update_or_create
(
personal_note
,
created
=
PersonalNote
.
objects
.
update_or_create
(
person
=
self
,
lesson_period
=
lesson_period
,
week
=
wanted_week
.
week
,
defaults
=
{
'
absent
'
:
absent
,
'
excused
'
:
excused
,
'
remarks
'
:
F
(
'
remarks
'
)
+
remarks
'
excused
'
:
excused
}
)
if
remarks
:
if
personal_note
.
remarks
:
personal_note
.
remarks
+=
'
; %s
'
%
remarks
else
:
personal_note
.
remarks
=
remarks
personal_note
.
save
()
@LessonPeriod.method
def
get_personal_notes
(
self
,
wanted_week
:
CalendarWeek
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment