Skip to content
Snippets Groups Projects
Commit 31624fcf authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Merge branch 'master' into dev

parents 1ffe1f33 941709c9
No related branches found
No related tags found
1 merge request!86Merge school-apps
......@@ -125,10 +125,10 @@ Stand: {% now "j. F Y H:i" %}\\
{# Display badge (for cancellations) #} {# Display notice and new line #}
{% if sub.badge %}
\normalsize\badge{ {{ sub.badge }} }
{% endif %} \color{ {{c}}} \large\textit{ {{sub.text|default:""}} } \\
{% endif %} \color{ {{c}}} \large\textit{ {{sub.text|default:""|safe}} } \\
{% endwith %}
{% endfor %}
\end{longtable}
\end{document}
\ No newline at end of file
\end{document}
......@@ -16,7 +16,6 @@
<p>
{% if element_container.substitution %}
{# SUBSTITUTION #}
{% if type == 1 and element_container.is_old %}
{# When it's the old room, let it empty #}
......
......@@ -98,11 +98,9 @@
<em>{{ sub.text|default:"" }}</em>
</td>
<td class="hide-on-small-and-down">
{% if sub.badge %}
<span class="badge new green darken-2">{{ sub.badge }}</span>
{% endif %}
</td>
</tr>
{% endfor %}
......
......@@ -290,8 +290,8 @@ class Absence(object):
def create(self, db_obj):
self.filled = True
print(db_obj.ida)
print(db_obj.typea)
# print(db_obj.ida)
# print(db_obj.typea)
if db_obj.typea == 101:
self.type = TYPE_TEACHER
elif db_obj.typea == 100:
......@@ -300,7 +300,7 @@ class Absence(object):
self.type = TYPE_ROOM
if self.type == TYPE_TEACHER:
print("IDA", db_obj.ida)
# print("IDA", db_obj.ida)
self.teacher = get_teacher_by_id(db_obj.ida)
else:
self.room = get_room_by_id(db_obj.ida)
......
......@@ -53,7 +53,7 @@ class Event(object):
self.rooms.append(obj)
if element[4] != "0" and element[4] != "":
print(element[4])
# print(element[4])
try:
absence_id = int(element[4])
absence = get_absence_by_id(absence_id)
......
......@@ -331,6 +331,10 @@ def get_substitutions_by_date_as_dict(date):
for i, sub_raw in enumerate(subs_raw):
if sub_raw.lesson_id not in subs.keys():
subs[sub_raw.lesson_id] = []
subs[sub_raw.lesson_id].append({"sub": sub_raw, "table": sub_table[i]})
sub_row = None
for sub_item in sub_table:
if sub_item.sub.id == sub_raw.id:
sub_row = sub_item
subs[sub_raw.lesson_id].append({"sub": sub_raw, "table": sub_row})
return subs
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment