Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Untis
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-Untis
Commits
44f26ec6
Commit
44f26ec6
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Last event changes
parent
3348bae0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
biscuit/apps/untis/sub.py
+10
-1
10 additions, 1 deletion
biscuit/apps/untis/sub.py
with
10 additions
and
1 deletion
biscuit/apps/untis/sub.py
+
10
−
1
View file @
44f26ec6
...
...
@@ -246,7 +246,7 @@ class HeaderInformation:
self
.
affected_teachers
)
>
0
or
len
(
self
.
affected_classes
)
>
0
def
get_header_information
(
subs
,
date
):
def
get_header_information
(
subs
,
date
,
events
=
[]
):
"""
Get header information like affected teachers/classes and missing teachers/classes for a given date
:param date: The date as datetime object
...
...
@@ -267,6 +267,15 @@ def get_header_information(subs, date):
if
_class
not
in
info
.
affected_classes
:
info
.
affected_classes
.
append
(
_class
)
for
event
in
events
:
for
teacher
in
event
.
teachers
:
if
teacher
.
id
not
in
[
x
.
id
for
x
in
info
.
affected_teachers
]:
info
.
affected_teachers
.
append
(
teacher
)
for
_class
in
event
.
classes
:
if
_class
.
id
not
in
[
x
.
id
for
x
in
info
.
affected_classes
]:
info
.
affected_classes
.
append
(
_class
)
# Get all absences that are relevant for this day
info
.
absences
=
get_all_absences_by_date
(
date
)
...
...
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