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
d565b615
Commit
d565b615
authored
5 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Show class teacher and deputy class teacher on plan views
closes #331
parent
2f5ae2a6
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/untis/api.py
+6
-3
6 additions, 3 deletions
biscuit/apps/untis/api.py
with
6 additions
and
3 deletions
biscuit/apps/untis/api.py
+
6
−
3
View file @
d565b615
from
django.conf
import
settings
from
django.conf
import
settings
from
untisconnect.api_helper
import
get_term_by_ids
,
run_using
,
untis_date_to_date
,
date_to_untis_date
from
untisconnect.api_helper
import
get_term_by_ids
,
run_using
,
untis_date_to_date
,
date_to_untis_date
,
\
untis_split_first
from
.
import
models
from
.
import
models
from
timetable.settings
import
untis_settings
from
timetable.settings
import
untis_settings
...
@@ -8,8 +9,6 @@ TYPE_TEACHER = 0
...
@@ -8,8 +9,6 @@ TYPE_TEACHER = 0
TYPE_ROOM
=
1
TYPE_ROOM
=
1
TYPE_CLASS
=
2
TYPE_CLASS
=
2
from
datetime
import
date
def
run_all
(
obj
,
filter_term
=
True
):
def
run_all
(
obj
,
filter_term
=
True
):
return
run_default_filter
(
run_using
(
obj
).
all
(),
filter_term
=
filter_term
)
return
run_default_filter
(
run_using
(
obj
).
all
(),
filter_term
=
filter_term
)
...
@@ -118,6 +117,7 @@ class Class(object):
...
@@ -118,6 +117,7 @@ class Class(object):
self
.
text1
=
None
self
.
text1
=
None
self
.
text2
=
None
self
.
text2
=
None
self
.
room
=
None
self
.
room
=
None
self
.
teachers
=
[]
def
__str__
(
self
):
def
__str__
(
self
):
if
self
.
filled
:
if
self
.
filled
:
...
@@ -138,6 +138,9 @@ class Class(object):
...
@@ -138,6 +138,9 @@ class Class(object):
self
.
name
=
db_obj
.
name
self
.
name
=
db_obj
.
name
self
.
text1
=
db_obj
.
longname
self
.
text1
=
db_obj
.
longname
self
.
text2
=
db_obj
.
text
self
.
text2
=
db_obj
.
text
teacher_ids
=
untis_split_first
(
db_obj
.
teacherids
,
int
)
self
.
teachers
=
[
get_teacher_by_id
(
t_id
)
for
t_id
in
teacher_ids
]
print
(
self
.
teachers
)
# print(db_obj.room_id)
# print(db_obj.room_id)
if
db_obj
.
room_id
!=
0
:
if
db_obj
.
room_id
!=
0
:
# print("RAUM")
# print("RAUM")
...
...
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