Initialisierung: Übertragung aus altem Repository

This commit is contained in:
2021-07-12 00:49:07 +02:00
commit c7f0c6a1c4
80 changed files with 12063 additions and 0 deletions
+166
View File
@@ -0,0 +1,166 @@
# NateMan Nachschreibtermin-Manager
# __init__.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält die Initialisierungsfunktion der NateMan-Webapp.
"""
import locale
import logging.handlers
import os
import sys
from datetime import datetime
import sqlalchemy
from flask import abort, Flask, request, send_from_directory
from flask.logging import default_handler
from werkzeug.utils import find_modules, import_string
from . import util
from .config_manager import config_file_exists, create_config_file, config
from .config_manager import read_config_file
from .models import Klausur, Klausurteilnahme, Koopschule, Lehrer, Schueler, Stufe, db
def create_app() -> Flask:
"""Initialisiert die NateMan-Webapp"""
app: Flask = Flask(__name__, instance_relative_config=True)
# Sprache festlegen
locale.setlocale(locale.LC_ALL, "")
setup_logging(app)
# falls nötig, instance-Ordner anlegen
os.makedirs(app.instance_path, exist_ok=True)
load_config(app)
secret_key = read_or_generate_secret_key(app)
configure_jinja(app)
# Falls in der Konfiguration aktiviert, Datei-Logging einrichten
if config["logging"].get("syslog", False):
setup_syslog(app)
# Logging-Level ändern
app.logger.setLevel(config["logging"]["level"])
# Flask und Flask-SQLAlchemy konfigurieren
app.config.from_mapping(
SERVER_NAME=config["server-name"],
SECRET_KEY=secret_key,
PREFERRED_URL_SCHEME="https" if config["uses-ssl"] else "http",
SESSION_COOKIE_SECURE=config["uses-ssl"],
MAX_CONTENT_LENGTH=16 * 1024 * 1024, # 16 MiB upload limit
SQLALCHEMY_DATABASE_URI="sqlite:///" + os.path.join(app.instance_path, "nateman.sqlite3"),
SQLALCHEMY_TRACK_MODIFICATIONS=False
)
db.init_app(app)
db.create_all(app=app)
# Blueprints registrieren
register_blueprints(app)
return app
def setup_logging(app: Flask):
stdout_handler = logging.StreamHandler(sys.stdout)
formatter = logging.Formatter(
fmt="[%(asctime)s | %(levelname)s]: %(message)s"
)
stdout_handler.setFormatter(formatter)
app.logger.removeHandler(default_handler)
app.logger.addHandler(stdout_handler)
def load_config(app: Flask):
"""
Liest die Konfigurationsdatei.
Falls keine vorhanden ist, erstellt eine und beendet anschließend NateMan.
"""
if not config_file_exists(app):
app.logger.critical("Die Konfigurationsdatei konnte nicht gefunden werden, erstellt eine neue...")
config_path = create_config_file(app)
app.logger.critical(f"Da die Konfigurationsdatei nicht gefunden werden konnte, "
f"wurde eine neue erstellt ({config_path}). NateMan wird nun beendet.")
sys.exit(1)
# Konfigurationsdatei laden
read_config_file(app)
def read_or_generate_secret_key(app: Flask) -> bytes:
""" Liest den Secret Key aus bzw. generiert ihn, falls noch keiner vorhanden ist. """
secret_key_path = os.path.join(app.instance_path, "SECRET_KEY")
if not os.path.isfile(secret_key_path):
with open(os.open(secret_key_path, os.O_WRONLY | os.O_CREAT, mode=0o600), "wb") as file:
secret_key = os.urandom(128)
file.write(secret_key)
else:
with open(secret_key_path, "rb") as file:
secret_key = file.read()
return secret_key
def configure_jinja(app: Flask):
app.jinja_env.globals.update(
nateman_config=config,
util=util,
sqlalchemy=sqlalchemy,
datetime=datetime,
db=db,
Klausurteilnahme=Klausurteilnahme,
Stufe=Stufe,
Schueler=Schueler,
Lehrer=Lehrer,
Klausur=Klausur,
Koopschule=Koopschule
)
app.jinja_env.trim_blocks = True
app.jinja_env.lstrip_blocks = True
app.jinja_env.strip_trailing_newlines = False
def setup_syslog(app: Flask):
""" Erstellt Logging-Handler zum loggen in Syslog. """
file_handler = logging.handlers.SysLogHandler(address="/dev/log")
file_formatter = logging.Formatter(fmt="nateman: [%(levelname)s] %(message)s")
file_handler.setFormatter(file_formatter)
app.logger.addHandler(file_handler)
def register_blueprints(app: Flask):
""" Registriert die Flask-Blueprints """
from . import blueprints
from .blueprints import admin, auth, error, fileio, info, klausuren, schueler
from .blueprints.admin import lehrer as admin_lehrer
app.register_blueprint(blueprints.bp)
app.register_blueprint(admin.bp)
app.register_blueprint(admin_lehrer.bp, name="admin.lehrer")
app.register_blueprint(auth.bp)
app.register_blueprint(error.bp)
app.register_blueprint(fileio.bp)
app.register_blueprint(info.bp)
app.register_blueprint(klausuren.bp)
app.register_blueprint(schueler.bp)
+186
View File
@@ -0,0 +1,186 @@
# NateMan Nachschreibtermin-Manager
# assigner.py
# Copyright © 2020 Johannes Bingel
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Zuordenen Methode
from typing import List
def iscoopLk(kurs: List):
for k in kurs:
if k.schueler.stammschule is not None:
return True
return False
def zuordnen(k_schueler):
# initziert Variablen
termin_1_kurse: [int, int] = []
termin_2_kurse: [int, int] = []
probleme_kurse = []
termin_1_kurse_s = []
termin_2_kurse_s = []
probleme_kurse_s = []
if len(k_schueler) != 0:
s_list = [[k_schueler.pop(0)]]
# Ordnet die Schüler den ihren Kursen zu
i = 0
for s in k_schueler:
while i < len(s_list):
if s.klausur.id == s_list[i][0].klausur.id:
s_list[i].append(s)
break
i += 1
else:
s_list.append([s])
i = 0
del i
# Findet und speichert die Konflikte in ein Dictionary
h_list = []
dic = {}
i = 0
i2 = 0
i3 = 0
i4 = 0
while i < len(s_list):
while i2 < len(s_list[i]):
while i3 < len(s_list):
while i4 < len(s_list[i3]):
if s_list[i][i2].schueler == s_list[i3][i4].schueler and i != i3 and str(i3) not in h_list:
h_list.append(str(i3))
i4 += 1
i3 += 1
i4 = 0
i2 += 1
i3 = 0
if h_list:
dic[str(i)] = h_list
h_list = []
i += 1
i2 = 0
del i
del i2
del i3
del i4
if dic != {}:
# Fügt die LKs Termin 1 zu
i = 0
while i < len(s_list):
if iscoopLk(s_list[i]) and str(i) in dic:
termin_1_kurse.append(str(i))
i += 1
while i < len(s_list):
if s_list[i][0].klausur.kursname[-2] == "L" and str(i) not in termin_1_kurse and str(i) in dic:
termin_1_kurse.append(str(i))
i += 1
del i
# Ordnet die LKs Fest ein
i = 0
while i < len(termin_1_kurse):
if str(i) not in termin_2_kurse:
for kurs in dic[termin_1_kurse[i]]:
if not (kurs in termin_2_kurse):
termin_2_kurse.append(kurs)
i += 1
else:
termin_1_kurse.remove(str(i))
i2 = 0
if not termin_1_kurse:
for d in dic:
termin_1_kurse.append(d)
break
# Füllt die Termine
finished = False
while not finished:
while not (i >= len(termin_1_kurse) and i2 >= len(termin_2_kurse)):
if i < len(termin_1_kurse):
for kurs in dic[termin_1_kurse[i]]:
if kurs in termin_1_kurse[:i]:
probleme_kurse.append(termin_1_kurse.pop(i))
break
else:
for kurs in dic[termin_1_kurse[i]]:
if not (kurs in termin_2_kurse):
termin_2_kurse.append(kurs)
i += 1
if i2 < len(termin_2_kurse):
for kurs in dic[termin_2_kurse[i2]]:
if kurs in termin_2_kurse[:i2]:
probleme_kurse.append(termin_2_kurse.pop(i2))
break
else:
for kurs in dic[termin_2_kurse[i2]]:
if not (kurs in termin_1_kurse):
termin_1_kurse.append(kurs)
i2 += 1
probleme_kurse = list(set(probleme_kurse))
for kurs in dic:
if kurs not in termin_1_kurse and kurs not in termin_2_kurse \
and kurs not in probleme_kurse:
termin_2_kurse.append(kurs)
break
else:
finished = True
# Ordnet die nicht problematischen Kurse zu
i = 0
while i < len(s_list):
if str(i) not in termin_1_kurse and str(i) not in termin_2_kurse and str(i) not in probleme_kurse:
termin_1_kurse.append(str(i))
i += 1
for kurs in termin_1_kurse:
for s in s_list[int(kurs)]:
termin_1_kurse_s.append(s)
for kurs in termin_2_kurse:
for s in s_list[int(kurs)]:
termin_2_kurse_s.append(s)
for kurs in probleme_kurse:
for s in s_list[int(kurs)]:
probleme_kurse_s.append(s)
k_schueler.insert(0, s_list[0][0])
# Ruft die Methode rekursiv auf bis keine Problemkurse vorhanden sind
if not probleme_kurse_s:
return [termin_1_kurse_s, termin_2_kurse_s]
else:
return [termin_1_kurse_s] + [termin_2_kurse_s] + zuordnen(probleme_kurse_s)
+33
View File
@@ -0,0 +1,33 @@
# NateMan Nachschreibtermin-Manager
# blueprints/__init__.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Index-Blueprint
"""
from flask import Blueprint, g, redirect, url_for, render_template
bp = Blueprint("index", __name__)
@bp.route("/")
def index():
""" Startseite (Pfad ``/``, leitet bei angemeldetem Lehrer auf Klausurseite um) """
if g.lehrer is not None:
return redirect(url_for("klausuren.mine"), code=303)
else:
return render_template("index/index.html.j2")
+69
View File
@@ -0,0 +1,69 @@
# NateMan Nachschreibtermin-Manager
# blueprints/admin/__init__.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Administrations-Blueprint
"""
from flask import Blueprint, flash, g, redirect, render_template, request, url_for, current_app
from sqlalchemy.exc import StatementError
from ..auth import admin_required
from ...models import db
bp = Blueprint("admin", __name__, url_prefix="/admin")
@bp.route("/")
@admin_required
def index():
""" enthält Links zur Administration (Seite *Administration*)"""
return render_template("admin/index.html.j2")
@bp.route("/sql-access", methods=("GET", "POST"))
@admin_required
def sql_access():
""" SQL-Zugriffsseite """
reload_response = redirect(url_for(".sql_access"), code=303)
if request.method != "POST":
return render_template("admin/sql_access.html.j2", query="", result=None)
# ELSE
query = request.form["query"].strip()
if not query:
flash("Bitte geben Sie eine SQL-Abfrage ein.", "error")
return reload_response
# Query ausführen
try:
result = db.session.execute(query)
except StatementError as exc:
flash(f"Die SQL-Abfrage konnte nicht ausgeführt werden.\n\nFehlerbeschreibung:\n{exc.orig}", "error")
return render_template("admin/sql_access.html.j2", query=query, result=None)
if not result.returns_rows:
db.session.commit()
logged_query = query.replace('\r\n', ' ').replace('\n', ' ')
current_app.logger.info(f"{g.lehrer} hat eine SQL-Abfrage ausgeführt: {logged_query}")
flash("Die SQL-Abfrage wurde erfolgreich ausgeführt.", "success")
return render_template("admin/sql_access.html.j2", query=query, result=result)
+206
View File
@@ -0,0 +1,206 @@
# NateMan Nachschreibtermin-Manager
# blueprints/admin/lehrer.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Lehrerkonten-Administrations-Blueprint
"""
from flask import Blueprint, abort, current_app, flash, g, redirect, render_template, request, url_for
from ..auth import admin_required
from ... import util
from ...models import Lehrer, Stufe, db
bp = Blueprint("lehrer", __name__, url_prefix="/admin/lehrer")
@bp.route("/")
@admin_required
def index():
""" Lehrerliste """
return render_template("admin/lehrer/index.html.j2")
@bp.route("/<int:lehrer_id>", methods=("GET", "POST"))
@admin_required
def edit(lehrer_id):
""" Lehrerbearbeitung """
lehrer: Lehrer = Lehrer.query.filter_by(id=lehrer_id).first()
# HTTP 404 Fehler erzeugen, wenn kein Lehrer unter der ID gefunden wurde
if not lehrer:
abort(404)
return
if request.method != "POST":
return render_template("admin/lehrer/edit.html.j2", lehrer=lehrer)
# ELSE
action = request.form["action"]
# Benutzerdaten ändern
if action == "change-credentials":
new_kuerzel = request.form["new-kuerzel"].strip()
new_email = request.form["new-email"].strip() or None
new_password = request.form["new-password"]
new_beraet_name = request.form["new-beraet"]
new_is_admin = ("new-admin" in request.form)
error_msg = None
change_kuerzel = False
change_email = False
change_password = False
change_beraet = False
change_is_admin = False
# Neues Kürzel, falls angegeben und nicht das aktuelle Kürzel
if new_kuerzel and new_kuerzel != lehrer.kuerzel:
change_kuerzel = True
# existiert das Kürzel bereits?
if Lehrer.query.filter_by(kuerzel=new_kuerzel).count() != 0:
error_msg = "Das angegebene Kürzel ist bereits registriert."
# Neue E-Mail-Adresse, falls angegeben und nicht die aktuelle Adresse
if new_email != lehrer.email:
change_email = True
# ist die neue E-Mail-Adresse syntaktisch ungültig?
if new_email is not None and not util.EMAIL_ADDRESS_REGEX.match(new_email):
error_msg = "Bitte geben Sie eine gültige E-Mail-Adresse ein."
# Neues Passwort, falls angegeben
if new_password:
change_password = True
# ist das neue Passwort zu groß?
if not util.validate_bcrypt_password(new_password):
error_msg = "Das neue Passwort darf höchstens 72 Zeichen lang sein."
if new_beraet_name == "":
new_beraet = None
else:
new_beraet = Stufe.query.filter_by(name=new_beraet_name).first()
if new_beraet is None:
abort(400)
return
if new_beraet != lehrer.beraet:
change_beraet = True
# Administratorstatus ändern
if new_is_admin != lehrer.is_admin:
change_is_admin = True
# Änderungen vornehmen, falls kein Fehler aufgetreten ist
if error_msg is not None:
# Es ist ein Fehler aufgetreten
flash(error_msg, "error")
return redirect(url_for(".edit", lehrer_id=lehrer_id), code=303)
if not (change_kuerzel or change_email or change_password or change_beraet or change_is_admin):
flash("Es wurde nichts geändert.", "error")
return redirect(url_for(".edit", lehrer_id=lehrer_id), code=303)
if change_kuerzel:
old_kuerzel = lehrer.kuerzel
lehrer.kuerzel = new_kuerzel
current_app.logger.info(f"{g.lehrer} hat das Lehrerkürzel des Kontos mit der ID {lehrer.id}"
f" von {old_kuerzel} auf {new_kuerzel} geändert.")
if change_email:
# E-Mail-Adresse wird als confirmed markiert, wenn ein Admin sie ändert
lehrer.email = new_email
lehrer.confirmation_token = None
lehrer.is_confirmed = True
current_app.logger.info(f"{g.lehrer} hat die E-Mail-Adresse von {lehrer} auf {new_email} gesetzt.")
if change_password:
lehrer.set_password(new_password)
current_app.logger.info(f"{g.lehrer} hat das Passwort von {lehrer} geändert.")
if change_beraet:
lehrer.beraet = new_beraet
if new_beraet:
current_app.logger.info(f"{g.lehrer} hat {lehrer} als Beratungslehrer(in) für die {new_beraet.name} "
f"festgelegt.")
else:
current_app.logger.info(f"{g.lehrer} hat den Beratungslehrerstatus von {lehrer} entfernt.")
if change_is_admin:
lehrer.is_admin = new_is_admin
if new_is_admin:
current_app.logger.info(f"{g.lehrer} hat {lehrer} den Administratorstatus vergeben.")
else:
current_app.logger.info(f"{g.lehrer} hat {lehrer} den Administratorstatus entfernt.")
db.session.commit()
flash("Benutzerdaten erfolgreich geändert.", "success")
return redirect(url_for(".edit", lehrer_id=lehrer_id), code=303)
# Account löschen
elif action == "delete-account":
current_app.logger.info(f"{g.lehrer} hat das Konto {lehrer} gelöscht.")
db.session.delete(lehrer)
db.session.commit()
flash("Benutzerkonto erfolgreich gelöscht.", "success")
return redirect(url_for(".index"), code=303)
abort(400) # Bad Request, wenn ungültige action
@bp.route("/add", methods=("GET", "POST"))
@admin_required
def add():
""" Lehrerhinzufügung """
if request.method != "POST":
return render_template("admin/lehrer/add.html.j2")
# ELSE
kuerzel = request.form["kuerzel"]
password = request.form["password"]
force_pwd_change = ("force-password-change" in request.form)
error_msg = None
# existiert das Kürzel bereits?
if Lehrer.query.filter_by(kuerzel=kuerzel).count() != 0:
error_msg = "Ein(e) Lehrer(in) mit diesem Kürzel existiert bereits."
# ist das neue Passwort zu groß?
elif not util.validate_bcrypt_password(password):
error_msg = "Das neue Passwort darf höchstens 72 Zeichen lang sein."
if error_msg:
flash(error_msg, "error")
return redirect(url_for(".add"), code=303)
new_lehrer = Lehrer(kuerzel=kuerzel)
new_lehrer.set_password(password, set_pwd_changed=not force_pwd_change)
db.session.add(new_lehrer)
db.session.commit()
flash("Lehrer(in) erfolgreich hinzugefügt.", "success")
current_app.logger.info(f"{g.lehrer} hat den/die Lehrer(in) {new_lehrer} hinzugefügt")
return redirect(url_for(".edit", lehrer_id=new_lehrer.id), code=303)
+477
View File
@@ -0,0 +1,477 @@
# NateMan Nachschreibtermin-Manager
# blueprints/auth.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Authentifizierungs-Blueprint
"""
import functools
import time
from datetime import datetime, timedelta
from smtplib import SMTPRecipientsRefused
from flask import Blueprint, abort, current_app, flash, g, redirect, render_template, request, url_for, make_response
from .. import emails, util
from ..config_manager import config
from ..models import Lehrer, db, Session
bp = Blueprint("auth", __name__)
SESSION_COOKIE_NAME = "login_session"
@bp.before_app_request
def load_logged_in_lehrer():
"""
Lädt den angemeldeten Lehrer vor jeder HTTP-Anfrage in die g.lehrer-Variable.
"""
session_key = request.cookies.get(SESSION_COOKIE_NAME)
session = Session.get(session_key)
g.session = session
if g.session is None:
g.lehrer = None
else:
g.lehrer = g.session.lehrer
@bp.after_app_request
def clear_rotten_session_cookie(response):
"""
Löscht veraltete Session-Cookies.
"""
if request.cookies.get(SESSION_COOKIE_NAME) and not g.lehrer:
response.delete_cookie(SESSION_COOKIE_NAME)
return response
def login_required(view):
"""
Dieser Decorator kann an Views angehängt werden, die einen angemeldeten Lehrer erfordern.
"""
@functools.wraps(view)
def wrapped_view(**kwargs):
# Kein Lehrer angemeldet?
if g.lehrer is None:
flash("Bitte melden Sie sich an.", "error")
return redirect(url_for("auth.login", r=request.path), code=303)
# muss der Lehrer sein Passwort ändern?
if g.lehrer and not g.lehrer.pwd_changed:
return redirect(url_for("auth.password_change"), code=303)
return view(**kwargs)
return wrapped_view
def beratungslehrer_required(view):
"""
Dieser Decorator kann an Views angehängt werden,
die einen angemeldeten Beratungslehrer oder Administrator erfordern.
"""
@functools.wraps(view)
def wrapped_view(**kwargs):
# Kein Lehrer angemeldet?
if g.lehrer is None:
flash("Bitte melden Sie sich an.", "error")
return redirect(url_for("auth.login", r=request.path), code=303)
# Lehrer kein Beratungslehrer oder Administrator?
if not g.lehrer.can_access():
abort(403)
return
# muss der Lehrer sein Passwort ändern?
if g.lehrer and not g.lehrer.pwd_changed:
return redirect(url_for("auth.password_change"), code=303)
return view(**kwargs)
return wrapped_view
def admin_required(view):
"""
Dieser Decorator kann an Views angehängt werden, die einen angemeldeten Administrator erfordern.
"""
@functools.wraps(view)
def wrapped_view(**kwargs):
# Kein Lehrer angemeldet?
if g.lehrer is None:
flash("Bitte melden Sie sich an.", "error")
return redirect(url_for("auth.login", r=request.path), code=303)
# Lehrer kein Administrator?
if not g.lehrer.is_admin:
abort(403)
return
# muss der Lehrer sein Passwort ändern?
if g.lehrer and not g.lehrer.pwd_changed:
return redirect(url_for("auth.password_change"), code=303)
return view(**kwargs)
return wrapped_view
@bp.route("/login", methods=("GET", "POST"))
def login():
""" Anmeldung (Seite *Anmelden*)"""
if request.method != "POST":
return render_template("auth/login.html.j2")
# ELSE
request_start_time = time.process_time()
kuerzel = request.form["kuerzel"].strip()
password = request.form["password"]
remember_me = ("remember-me" in request.form)
error = False
lehrer = Lehrer.query.filter_by(kuerzel=kuerzel).first()
# existiert Lehrer nicht?
if lehrer is None:
error = True
current_app.logger.info(f"Fehlgeschlagener Anmeldeversuch von {request.remote_addr} "
f"(Ungültiges Kürzel '{kuerzel}')")
# ist das Passwort falsch?
elif not lehrer.check_password(password):
error = True
current_app.logger.info(f"Fehlgeschlagener Anmeldeversuch von {request.remote_addr} "
f"(Falsches Passwort für {lehrer.kuerzel})")
if error:
# Bei fehlgeschlagenem Anmeldeversuch 2 Sekunden vor Antwort warten
time.sleep(request_start_time - time.process_time() + 2)
flash("Ungültige Anmeldedaten.", "error")
return redirect(url_for(".login", r=request.args.get("r", None)), code=303)
# Kein Fehler -> Lehrer anmelden
current_app.logger.info(f"{lehrer} hat sich angemeldet.")
session_expiry_delta = timedelta(days=12) if remember_me else timedelta(hours=1)
session = Session.create(lehrer, session_expiry_delta)
if not lehrer.pwd_changed:
red = redirect(url_for(".password_change"), code=303)
else:
redirect_path = request.args.get("r", None)
# Wenn ein Weiterleitungspfad als GET-Parameter übergeben wurde
# (wie es z.B. der login_required-Wrapper macht, wenn kein Benutzer
# angemeldet ist), auf diesen Pfad weiterleiten, falls er mit einem
# Schrägstrich beginnt (also kein externer Link ist).
if redirect_path and len(redirect_path) > 0 and redirect_path[0] == "/":
red = redirect(redirect_path, code=303)
else:
red = redirect(url_for("klausuren.mine"), code=303)
db.session.commit()
resp = make_response(red)
resp.set_cookie(SESSION_COOKIE_NAME, session.key,
max_age=session_expiry_delta.total_seconds() if remember_me else None,
expires=session.expiry if remember_me else None, secure=config["uses-ssl"], httponly=True,
samesite="Strict")
return resp
@bp.route("/logout")
def logout():
""" Abmeldung (Seite *Abmelden*)"""
resp = make_response(redirect(url_for("auth.login"), code=303))
if g.lehrer:
current_app.logger.info(f"{g.lehrer} hat sich abgemeldet.")
resp.delete_cookie("login_session")
db.session.delete(g.session)
db.session.commit()
return resp
@bp.route("/confirm-email")
def confirm_email():
""" Emailbestätigung """
red = redirect(url_for(".login" if g.lehrer is None else "klausuren.mine"), code=303)
token = request.args.get("token", None)
if token is None:
flash("Ungültiger/veralteter Bestätigungslink.", "alert")
return red
lehrer = Lehrer.query.filter_by(confirmation_token=token).first()
if lehrer is None:
flash("Ungültiger/veralteter Bestätigungslink.", "alert")
return red
# ELSE
lehrer.confirmation_token = None
lehrer.is_confirmed = True
db.session.commit()
current_app.logger.info(f"{lehrer} hat die eigene E-Mail-Adresse ({lehrer.email}) bestätigt.")
flash("Die E-Mail-Adresse wurde erfolgreich bestätigt.", "success")
return red
@bp.route("/password-change", methods=("GET", "POST"))
def password_change():
""" Passwortänderung nach erstem Login """
# login_required kann hier nicht verwendet werden,
# da es ein verändertes Passwort erfordert
if not g.lehrer:
return redirect(url_for("auth.login"), code=303)
if g.lehrer.pwd_changed:
return redirect(url_for(".account"), code=303)
if request.method != "POST":
return render_template("auth/password-change.html.j2")
# ELSE
new_pass = request.form["new-password"]
new_pass_confirm = request.form["new-password-confirm"]
error_msg = None
if not new_pass or not new_pass_confirm:
error_msg = "Bitte geben Sie ein neues Passwort ein."
# ist das neue Passwort kürzer als 6 Zeichen?
if len(new_pass) < 6:
error_msg = "Das neue Passwort muss mindestens 6 Zeichen lang sein."
# ist das neue Passwort zu groß?
elif not util.validate_bcrypt_password(new_pass):
error_msg = "Das neue Passwort darf höchstens 72 Zeichen lang sein."
# stimmen die neuen Passwörter nicht überein?
elif new_pass != new_pass_confirm:
error_msg = "Die neuen Passwörter stimmen nicht überein."
# Änderungen vornehmen, falls kein Fehler aufgetreten ist
if error_msg:
# Es ist ein Fehler aufgetreten
flash(error_msg, "error")
return redirect(url_for(".account"), code=303)
g.lehrer.set_password(new_pass)
db.session.commit()
current_app.logger.info(f"{g.lehrer} hat das eigene Passwort geändert.")
return redirect(url_for("klausuren.mine"), code=303)
@bp.route("/password-reset", methods=("GET", "POST"))
def password_reset():
""" Passwortzurücksetzung (Seite *Passwort vergessen*)"""
red = redirect(url_for(".login" if g.lehrer is None else "klausuren.mine"), code=303)
token = request.args.get("token", None)
t_lehrer = None
if token is not None:
t_lehrer = Lehrer.query.filter_by(password_reset_token=token).first()
expired = False
if t_lehrer is not None:
expired = t_lehrer.password_reset_expiry < datetime.utcnow()
if expired:
t_lehrer.password_reset_token = None
t_lehrer.password_reset_expiry = None
db.session.commit()
if t_lehrer is None or expired:
flash("Ungültiger/veralteter Zurücksetzungslink.", "alert")
return red
if request.method == "POST":
if token is None:
# --- Antragstellung ---
lehrer_kuerzel = request.form["lehrer-kuerzel"]
email_address = request.form["email-address"]
lehrer = Lehrer.query.filter_by(kuerzel=lehrer_kuerzel, email=email_address).first()
if lehrer is None:
flash("Es gibt keine(n) Lehrer(in) mit den angegebenen Kriterien.", "error")
return redirect(url_for(".password_reset"), code=303)
if not lehrer.is_confirmed:
flash("Es gibt eine(n) Lehrer(in) mit den angegebenen Kriterien, allerdings ist dessen/deren "
"E-Mail-Adresse nicht bestätigt.\nWenden Sie sich an eine(n) Administrator(in).", "error")
return redirect(url_for(".password_reset"), code=303)
new_token = util.random_uri_safe_string(64)
lehrer.password_reset_token = new_token
lehrer.password_reset_expiry = datetime.utcnow() + timedelta(hours=1)
# Zurücksetzungsemail senden
try:
emails.send_password_reset_mail(lehrer.email, new_token)
except SMTPRecipientsRefused:
flash(f"Es konnte keine E-Mail an {lehrer.email} gesendet werden.\n"
f"Wahrscheinlich existiert diese Adresse nicht mehr.\n"
f"Wenden Sie sich an eine(n) Administrator(in).", "error")
return redirect(url_for(".password_reset"), code=303)
db.session.commit()
flash("Sie müssten nun eine E-Mail bekommen mit einem Link, über den Sie Ihr Passwort ändern können.\n"
"Der Link ist eine Stunde lang gültig.", "success")
current_app.logger.info(f"Für {lehrer} wurde eine Passwortzurücksetzung beantragt.")
else:
# --- Passwortänderung ---
new_pass = request.form["new-password"]
new_pass_confirm = request.form["new-password-confirm"]
error_msg = None
# ist das neue Passwort kürzer als 6 Zeichen?
if len(new_pass) < 6:
error_msg = "Das neue Passwort muss mindestens 6 Zeichen lang sein."
# ist das neue Passwort zu groß?
elif not util.validate_bcrypt_password(new_pass):
error_msg = "Das neue Passwort darf höchstens 72 Zeichen lang sein."
# stimmen die neuen Passwörter nicht überein?
elif new_pass != new_pass_confirm:
error_msg = "Die neuen Passwörter stimmen nicht überein."
if error_msg:
flash(error_msg, "error")
return redirect(url_for(".password_reset", token=token), code=303)
# ELSE
t_lehrer.password_reset_token = None
t_lehrer.set_password(new_pass)
db.session.commit()
current_app.logger.info(f"{t_lehrer} hat das eigene Passwort zurückgesetzt.")
flash("Das Passwort wurde erfolgreich zurückgesetzt.", "success")
return red
else:
if token is None:
# --- Formular zur Antragstellung ---
return render_template("auth/password-reset-send.html.j2")
else:
# --- Formular zur Passwortänderung ---
return render_template("auth/password-reset-do.html.j2")
@bp.route("/account", methods=("GET", "POST"))
@login_required
def account():
""" Kontoeinstellungen (Seite *Mein Konto*) """
if request.method != "POST":
return render_template("auth/account.html.j2")
# ELSE
current_password = request.form["current-password"]
new_email = request.form["new-email"].strip() or None
new_pass = request.form["new-password"]
new_pass_confirm = request.form["new-password-confirm"]
error_msg = None
change_kuerzel = False
change_email = False
change_password = False
# ist das aktuelle Passwort falsch?
if not g.lehrer.check_password(current_password):
error_msg = "Falsches aktuelles Passwort."
else:
# Neue E-Mail-Adresse, falls angegeben und nicht die aktuelle Adresse
if new_email != g.lehrer.email:
change_email = True
# ist die neue E-Mail-Adresse syntaktisch ungültig?
if new_email is not None and not util.EMAIL_ADDRESS_REGEX.match(new_email):
error_msg = "Bitte geben Sie eine gültige E-Mail-Adresse ein."
# Neues Passwort, falls angegeben
if new_pass:
change_password = True
# ist das neue Passwort kürzer als 6 Zeichen?
if len(new_pass) < 6:
error_msg = "Das neue Passwort muss mindestens 6 Zeichen lang sein."
# ist das neue Passwort zu groß?
elif not util.validate_bcrypt_password(new_pass):
error_msg = "Das neue Passwort darf höchstens 72 Zeichen lang sein."
# stimmen die neuen Passwörter nicht überein?
elif new_pass != new_pass_confirm:
error_msg = "Die neuen Passwörter stimmen nicht überein."
# Änderungen vornehmen, falls kein Fehler aufgetreten ist
if error_msg:
# Es ist ein Fehler aufgetreten
flash(error_msg, "error")
return redirect(url_for(".account"), code=303)
# ELSE
if not change_kuerzel and not change_email and not change_password:
return redirect(url_for(".account"), code=303)
if change_email:
if new_email is not None:
token = util.random_uri_safe_string(32)
# Bestätigungsemail senden
try:
emails.send_confirmation_link_mail(new_email, token)
except SMTPRecipientsRefused:
flash(f"Wir konnten keine Bestätigungsemail an {new_email} senden. "
f"Wahrscheinlich existiert diese Adresse nicht.", "error")
return redirect(url_for(".account"), code=303)
g.lehrer.confirmation_token = token
old_email = g.lehrer.email
g.lehrer.email = new_email
g.lehrer.is_confirmed = new_email is None
current_app.logger.info(f"{g.lehrer} hat die eigene E-Mail-Adresse von {old_email} "
f"auf {g.lehrer.email} geändert.")
if change_password:
g.lehrer.set_password(new_pass)
current_app.logger.info(f"{g.lehrer} hat das eigene Passwort geändert.")
db.session.commit()
flash("Benutzerdaten erfolgreich geändert.", "success")
return redirect(url_for(".account"), code=303)
+48
View File
@@ -0,0 +1,48 @@
# NateMan Nachschreibtermin-Manager
# blueprints/error.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält ausschließlich Errorhandler.
"""
from flask import Blueprint, render_template
bp = Blueprint("error", __name__)
@bp.app_errorhandler(400)
def error_400(error):
"""400 - Ungültige Anfrage"""
return render_template("error/400.html.j2"), 400
@bp.app_errorhandler(403)
def error_403(error):
"""403 - Verboten"""
return render_template("error/403.html.j2"), 403
@bp.app_errorhandler(404)
def error_404(error):
"""404 - Seite nicht gefunden"""
return render_template("error/404.html.j2"), 404
@bp.app_errorhandler(500)
def error_500(error):
"""500 - serverseitiger Fehler"""
return render_template("error/500.html.j2"), 500
+163
View File
@@ -0,0 +1,163 @@
# NateMan Nachschreibtermin-Manager
# blueprints/fileio.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Export- und Import-Blueprint
"""
import os
import tempfile
from datetime import datetime
from flask import abort, Blueprint, current_app, g, redirect, url_for, flash, request, render_template
from openpyxl.utils.exceptions import InvalidFileException
from pyexpat import ExpatError
from .auth import beratungslehrer_required, admin_required
from .. import exporter, util
from ..importer import KlausurplanImportError, import_plan, excelimport, KoopSchuelerImportError
from ..models import db, Stufe, Klausur, Schueler
bp = Blueprint("fileio", __name__)
@bp.route("/export")
@beratungslehrer_required
def export():
""" Export (Seite *Nachschreibplan exportieren*)"""
with tempfile.NamedTemporaryFile(prefix="nateman_export_") as fp:
exporter.excelexport(fp.name, g.lehrer.accessible_stufen())
# XLSX-Datei wird in ``filebytes`` geladen, damit die temporäre Datei gelöscht werden kann
fp.seek(0)
filebytes = fp.read()
download_name = "NateMan-Export " + datetime.now().strftime("%Y-%m-%d") + ".xlsx"
xlsx_mimetype = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
response = current_app.response_class(filebytes, mimetype=xlsx_mimetype)
response.headers.set("Content-Disposition", "attachment", filename=download_name)
return response
@bp.route("/import", methods=("GET", "POST"), endpoint="import")
@admin_required
def import_():
""" Import (Seite *Klausurpläne importieren*) """
if request.method != "POST":
return render_template("fileio/import.html.j2")
# ELSE
all_stufen = Stufe.query.all()
for stufe in all_stufen:
if "del_" + stufe.name in request.form:
if not g.lehrer.can_access(stufe):
abort(400)
return
_del_plan(stufe)
db.session.commit()
flash("Klausurplan erfolgreich gelöscht.", "success")
current_app.logger.info(f"{g.lehrer} hat den Klausurplan für die {stufe.name} gelöscht.")
return redirect(url_for(".import"), code=303)
new_lehrer_password = request.form["new-lehrer-password"]
error_msg = None
if not new_lehrer_password:
error_msg = "Bitte geben Sie das Passwort für neu registrierte Lehrer(innen) an."
elif not util.validate_bcrypt_password(new_lehrer_password):
error_msg = "Das Passwort für neue Lehrer(innen) darf nicht mehr als 72 Zeichen enthalten."
if error_msg is not None:
flash(error_msg, "error")
return redirect(url_for(".import"), code=303)
plan_given = []
for stufe in all_stufen:
plan = request.files.get("plan_" + stufe.name, None)
# Klausurplan importieren
if plan and plan.filename:
plan_given.append(stufe.name)
_del_plan(stufe)
try:
import_plan(plan, stufe, new_lehrer_password)
except (KeyError, ValueError, ExpatError, KlausurplanImportError) as exc:
db.session.rollback()
flash(f"Beim Importieren des Klausurplans für die {stufe.name} ist ein Fehler aufgetreten.\n"
f"Wahrscheinlich ist die Klausurplandatei ungültig oder es gibt einen Konflikt mit den "
f"bisherigen Daten.\n\nFehlerbeschreibung: {type(exc).__name__}\n{exc}", "error")
current_app.logger.warning(f"Beim Versuch von {g.lehrer}, einen Klausurplan zu importieren, "
f"ist ein Fehler aufgetreten.", exc_info=exc)
return redirect(url_for(".import"), code=303)
ks_file = request.files.get("koopschueler", None)
ks_file_given = False
# Koopschülerdatei importieren
ks_import_failures = []
if ks_file and ks_file.filename:
ks_file_given = True
_del_koopschueler()
filename_ext = os.path.splitext(ks_file.filename)[1]
with tempfile.NamedTemporaryFile(prefix="nateman_ks_import_", suffix=filename_ext) as fp:
ks_file.save(fp.name)
try:
ks_import_failures = excelimport(fp.name)
except (InvalidFileException, KoopSchuelerImportError) as exc:
db.session.rollback()
flash(f"Beim Importieren der Koopschülerliste ist ein Fehler aufgetreten.\n\n"
f"Fehlerbeschreibung: {type(exc).__name__}\n{exc}", "error")
current_app.logger.warning(f"Beim Versuch von {g.lehrer}, eine Koopschülerliste zu importieren, "
f"ist ein Fehler aufgetreten.", exc_info=exc)
return redirect(url_for(".import"), code=303)
if len(plan_given) == 0 and not ks_file_given:
flash("Es wurden keine Pläne angegeben.", "error")
else:
if len(ks_import_failures) == 0:
flash("Pläne importiert.", "success")
else:
flash("Pläne importiert.\n\nKoopschülerimport: Folgende SuS konnten nicht importiert werden:\n"
+ "; ".join(f"{failure[0]}, {failure[1]}" for failure in ks_import_failures) + ".\n"
"Die restlichen KoopSuS wurden trotzdem importiert.", "warning")
current_app.logger.info(f"{g.lehrer} hat Pläne importiert.")
db.session.commit()
return redirect(url_for(".import"), code=303)
def _del_plan(stufe: Stufe):
"""Löscht alle Klausuren und Schüler der angegebenen Stufe"""
stufe.import_date = None
Klausur.query.filter_by(stufe=stufe).delete()
Schueler.query.filter_by(stufe=stufe).delete()
def _del_koopschueler():
"""Löscht alle Koopschüler"""
Schueler.query.filter(Schueler.stammschule != None).delete()
+30
View File
@@ -0,0 +1,30 @@
# NateMan Nachschreibtermin-Manager
# blueprints/info.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Informations-Blueprint
"""
from flask import Blueprint, render_template
bp = Blueprint("info", __name__, url_prefix="/info")
@bp.route("/licenses")
def licenses():
""" Lizenzen """
return render_template("info/licenses.html.j2")
+338
View File
@@ -0,0 +1,338 @@
# NateMan Nachschreibtermin-Manager
# blueprints/klausuren.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Klausurlisten-Blueprint
"""
from datetime import datetime
from flask import Blueprint, abort, current_app, flash, g, redirect, render_template, request, url_for, Response
from .auth import login_required, beratungslehrer_required
from ..config_manager import config
from ..models import Klausur, Klausurteilnahme, Koopschule, Lehrer, Schueler, db, \
get_next_new_schueler_id, Stufe
bp = Blueprint("klausuren", __name__, url_prefix="/klausuren")
@bp.route("/")
@login_required
def mine():
""" Ansicht der eigenen Klausuren (Seite *Meine Klausuren*) """
klausur_query = Klausur.query.filter(Klausur.lehrer == g.lehrer).order_by(Klausur.date.desc())
klausuren_anstehend = klausur_query.filter(Klausur.date > datetime.now().date()).all()
klausuren_vergangen = klausur_query.filter(Klausur.date <= datetime.now().date()).all()
return render_template("klausuren/mine.html.j2", klausuren_anstehend=klausuren_anstehend,
klausuren_vergangen=klausuren_vergangen)
@bp.route("/<stufe_name>/", endpoint="stufe")
def stufe_(stufe_name):
""" Ansicht der Klausuren einer Stufe (Seite *Klausuren [Stufe]*) """
stufe = Stufe.query.filter_by(name=stufe_name).first()
if stufe is None:
abort(404)
return
dates_query = db.session.query(Klausur.date).filter_by(stufe=stufe).order_by(Klausur.date.desc())
dates_anstehend = [t.date for t in dates_query.filter(Klausur.date > datetime.now().date()).distinct()]
dates_vergangen = [t.date for t in dates_query.filter(Klausur.date <= datetime.now().date()).distinct()]
return render_template("klausuren/stufe.html.j2", stufe=stufe, dates_anstehend=dates_anstehend,
dates_vergangen=dates_vergangen)
@bp.route("/<stufe_name>/add", methods=("GET", "POST"))
@beratungslehrer_required
def add(stufe_name):
""" Klausurhinzufügung """
reload_resp = redirect(url_for(".add", stufe_name=stufe_name), code=303)
stufe = Stufe.query.filter_by(name=stufe_name).first()
if stufe is None:
abort(404)
return
if not g.lehrer.can_access(stufe):
abort(403)
return
if request.method != "POST":
return render_template("klausuren/add.html.j2", stufe=stufe)
# ELSE
kursname = request.form["kursname"]
lehrer_id = request.form["lehrer"]
date_str = request.form["date"]
try:
startperiod = int(request.form["startperiod"])
endperiod = int(request.form["endperiod"])
except ValueError:
abort(400)
return
if startperiod < 0 or startperiod > endperiod or endperiod.bit_length() > 32:
flash("Ungültiger Zeitraum", "error")
return reload_resp
if not kursname:
flash("Bitte geben Sie einen Kursnamen an.", "error")
return reload_resp
try:
date = datetime.strptime(date_str, "%Y-%m-%d").date()
except ValueError:
abort(400)
return
lehrer = Lehrer.query.filter_by(id=lehrer_id).first()
if lehrer is None:
abort(400)
return
new_klausur = Klausur(kursname=kursname, date=date, startperiod=startperiod, endperiod=endperiod, stufe=stufe,
lehrer=lehrer)
db.session.add(new_klausur)
db.session.commit()
flash("Die Klausur wurde erfolgreich hinzugefügt.", "success")
current_app.logger.info(f"{g.lehrer} hat die Klausur {new_klausur} hinzugefügt.")
return redirect(url_for(".edit", klausur_id=new_klausur.id), code=303)
@bp.route("/<int:klausur_id>", methods=("GET", "POST"))
@login_required
def edit(klausur_id):
""" Klausurbearbeitung """
klausur = Klausur.query.filter_by(id=klausur_id).first()
if klausur is None:
abort(404)
return
if not g.lehrer.can_access(klausur.stufe) and klausur.lehrer != g.lehrer:
abort(403)
return
# ELSE
if request.method != "POST":
kt_list = Klausurteilnahme.query \
.filter_by(klausur=klausur) \
.join(Schueler) \
.order_by(Schueler.nachname, Schueler.vorname) \
.all()
not_in_klausur_list = Schueler.query \
.filter_by(stufe=klausur.stufe) \
.filter(Schueler.id.notin_(db.session.query(Klausurteilnahme.schueler_id).filter_by(klausur=klausur))) \
.order_by(Schueler.nachname, Schueler.vorname) \
.all()
return render_template("klausuren/edit.html.j2", klausur=klausur, kt_list=kt_list,
not_in_klausur_list=not_in_klausur_list)
# ELSE
reload_resp = redirect(url_for(".edit", klausur_id=klausur_id), code=303)
exit_resp: Response
if klausur.lehrer == g.lehrer:
exit_resp = redirect(url_for(".mine"), code=303)
else:
exit_resp = redirect(url_for(".stufe", stufe_name=klausur.stufe.name), code=303)
if klausur.edited and not g.lehrer.can_access(klausur.stufe):
abort(400)
return
action = request.form["action"]
if action == "edit":
lehrer_can_access = g.lehrer.can_access(klausur.stufe)
annotation = request.form["annotation"].strip()
flag_as_edited = ("flag-as-edited" in request.form)
klausur_laenge_str = request.form.get("laenge", None)
if lehrer_can_access and not klausur_laenge_str:
klausur_laenge = None
else:
try:
klausur_laenge = int(klausur_laenge_str)
except ValueError:
abort(400)
return
if klausur_laenge not in config["klausuren"]["klausurlaengen"]:
abort(400)
return
klausur.laenge = klausur_laenge
for kt in Klausurteilnahme.query.filter_by(klausur=klausur).all():
kt.versaeumt = (f"s_{kt.schueler.id}" in request.form)
if annotation:
if len(annotation) > config["klausuren"]["max-annotation-length"]:
abort(400)
return
klausur.annotation = annotation
else:
klausur.annotation = None
if lehrer_can_access:
klausur.edited = flag_as_edited
else:
klausur.edited = True
current_app.logger.info(f"{g.lehrer} hat die Klausur {klausur} bearbeitet.")
flash("Klausur erfolgreich bearbeitet.", "success")
db.session.commit()
return exit_resp
elif action == "edit-advanced":
if not g.lehrer.can_access(klausur.stufe):
abort(400)
return
new_lehrer_id = request.form["new-lehrer"]
new_date_str = request.form["new-date"]
try:
new_startperiod = int(request.form["new-startperiod"])
new_endperiod = int(request.form["new-endperiod"])
except ValueError:
abort(400)
return
if new_startperiod < 0 or new_startperiod > new_endperiod or new_endperiod.bit_length() > 32:
flash("Ungültiger Zeitraum", "error")
return reload_resp
try:
new_date = datetime.strptime(new_date_str, "%Y-%m-%d").date()
except ValueError:
abort(400)
return
new_lehrer = Lehrer.query.filter_by(id=new_lehrer_id).first()
if new_lehrer is None:
abort(400)
return
klausur.lehrer = new_lehrer
klausur.date = new_date
klausur.startperiod = new_startperiod
klausur.endperiod = new_endperiod
current_app.logger.info(f"{g.lehrer} hat die Klausur {klausur} erweitert bearbeitet.")
flash("Klausur erfolgreich bearbeitet.", "success")
db.session.commit()
return reload_resp
elif action == "delete":
if not g.lehrer.can_access(klausur.stufe):
abort(400)
return
current_app.logger.info(f"{g.lehrer} hat die Klausur {klausur} gelöscht.")
flash("Die Klausur wurde erfolgreich gelöscht.", "success")
db.session.delete(klausur)
db.session.commit()
return exit_resp
elif action == "add-schueler":
schueler_id = request.form.get("added-schueler", None)
add_to = request.form["add-to"]
if schueler_id is None:
flash("Bitte wählen Sie eine(n) Schüler(in) zum Hinzufügen aus.", "error")
return reload_resp
is_new = False
if schueler_id == "new-schueler":
is_new = True
new_schueler_nachname = request.form["new-schueler-nachname"].strip()
new_schueler_vorname = request.form["new-schueler-vorname"].strip()
new_schueler_stammschule_kuerzel = request.form.get("new-schueler-stammschule", None)
stammschule = None
if new_schueler_stammschule_kuerzel:
stammschule = Koopschule.query.filter_by(kuerzel=new_schueler_stammschule_kuerzel).first()
if stammschule is None:
abort(400)
return
if not new_schueler_nachname or not new_schueler_vorname:
flash("Bitte geben Sie einen vollständigen Namen für den/die neue(n) Schüler(in) an.", "error")
return reload_resp
schueler = Schueler(id=get_next_new_schueler_id(), nachname=new_schueler_nachname,
vorname=new_schueler_vorname, stufe=klausur.stufe,
stammschule=stammschule)
db.session.add(schueler)
else:
schueler = Schueler.query.filter_by(id=schueler_id).first()
if schueler is None:
abort(400)
return
if Klausurteilnahme.query.filter_by(klausur=klausur, schueler=schueler).first() is not None:
abort(400)
return
if add_to == "klausur":
klausuren = [klausur]
elif add_to == "kurs":
klausuren = Klausur.query.filter_by(stufe=klausur.stufe).filter_by(kursname=klausur.kursname).all()
else:
abort(400)
return
for k in klausuren:
kt_entity = Klausurteilnahme(klausur=k, schueler=schueler)
db.session.add(kt_entity)
current_app.logger.info(f"{g.lehrer} hat den/die{' neue(n)' if is_new else ''} Schüler(in) {schueler} "
f"zur Klausur {klausur} hinzugefügt.")
db.session.commit()
return reload_resp
elif action == "remove-schueler":
for kt in Klausurteilnahme.query.join(Klausur)\
.filter_by(stufe=klausur.stufe)\
.filter_by(kursname=klausur.kursname)\
.all():
if f"r_{kt.schueler.id}" in request.form:
db.session.delete(kt)
current_app.logger.info(f"{g.lehrer} hat den/die Schüler(in) {kt.schueler} aus der Klausur "
f"{kt.klausur} entfernt.")
db.session.commit()
return reload_resp
else:
# Bad Request, wenn ungültige action
abort(400)
+61
View File
@@ -0,0 +1,61 @@
# NateMan Nachschreibtermin-Manager
# blueprints/schueler.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Schüler-Blueprint
"""
from typing import Dict, List, Tuple
from flask import Blueprint, current_app, flash, g, redirect, render_template, request, url_for
from .auth import beratungslehrer_required
from ..models import Klausurteilnahme, db, Schueler, Klausur, Stufe
bp = Blueprint("schueler", __name__, url_prefix="/schueler")
@bp.route("/versaeumnisse/", methods=("GET", "POST"))
@beratungslehrer_required
def versaeumnisse():
""" Versäumnisliste (Seite *Versäumnisse*) """
if request.method != "POST":
versaeumt_dict: Dict[Stufe, Tuple[List[Klausurteilnahme], List[Klausurteilnahme]]] = {}
for stufe in g.lehrer.accessible_stufen():
base_query = Klausurteilnahme.query.join(Schueler).join(Klausur) \
.filter(Klausurteilnahme.versaeumt) \
.filter(Klausur.stufe == stufe) \
.order_by(Schueler.nachname, Schueler.vorname)
versaeumt_dict[stufe] = (
base_query.filter(~Klausurteilnahme.nachgeschrieben).all(),
base_query.filter(Klausurteilnahme.nachgeschrieben).all(),
)
return render_template("schueler/versaeumnisse.html.j2", versaeumt_dict=versaeumt_dict)
# ELSE
for kt in Klausurteilnahme.query.filter_by(versaeumt=True).all():
if g.lehrer.can_access(kt.klausur.stufe):
kt.attestiert = (f"a_{kt.klausur.id}:{kt.schueler.id}" in request.form)
kt.nachgeschrieben = (f"n_{kt.klausur.id}:{kt.schueler.id}" in request.form)
current_app.logger.info(f"{g.lehrer} hat die Versäumnisliste bearbeitet.")
flash("Versäumnisliste erfolgreich bearbeitet.", "success")
db.session.commit()
return redirect(url_for(".versaeumnisse"), code=303)
+260
View File
@@ -0,0 +1,260 @@
# NateMan Nachschreibtermin-Manager
# commands.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält Befehle zur Verwendung im Terminal (Command Line Interface).
"""
import click
from flask.cli import with_appcontext
from nateman.exporter import excelexport
from nateman.importer import excelimport, KoopSchuelerImportError
from . import emails, util, assigner
from .models import Koopschule, Lehrer, Stufe, db, Session
from .config_manager import config
@click.group()
def cli():
"""Enthält Befehle zur Steuerung der NateMan-Webanwendung."""
pass
@click.command("add-lehrer")
@click.argument("kuerzel", type=click.STRING)
@click.option("--password", type=click.STRING, default=None)
@click.option("--admin", is_flag=True)
@with_appcontext
def add_lehrer_command(kuerzel, password, admin):
"""Erstellt einen Lehreraccount."""
lehrer = Lehrer.query.filter_by(kuerzel=kuerzel).first()
if lehrer is not None:
click.echo("Fehler: Ein(e) Lehrer(in) mit diesem Kürzel ist bereits registriert.", err=True)
return 1
if not password:
password = click.prompt("Neues Passwort eingeben (unsichtbar)", hide_input=True)
if not util.validate_bcrypt_password(password):
click.echo("Fehler: Das Passwort darf höchstens 72 Bytes groß sein.", err=True)
return 1
new_lehrer = Lehrer(kuerzel=kuerzel, is_admin=admin)
new_lehrer.set_password(password)
db.session.add(new_lehrer)
db.session.commit()
click.echo("Lehrer(in) wurde erfolgreich registriert.")
return 0
@click.command("add-stufe")
@click.argument("names", type=click.STRING, nargs=-1)
@with_appcontext
def add_stufe_command(names):
"""Fügt eine neue Stufe zur Datenbank hinzu."""
if len(names) == 0:
click.echo("Fehler: Bitte geben Sie mindestens eine Stufe an.", err=True)
return 1
for name in names:
if util.is_integer_string(name):
click.echo(f"Fehler: Stufenname darf keine Ganzzahl sein.", err=True)
return 1
stufe = Stufe.query.filter_by(name=name).first()
if stufe is not None:
click.echo(f"Fehler: Die Stufe {name} existiert bereits.", err=True)
return 1
new_stufe = Stufe(name=name)
db.session.add(new_stufe)
db.session.commit()
click.echo("Die Stufe(n) wurde(n) erfolgreich hinzugefügt.")
return 0
@click.command("remove-stufe")
@click.argument("name", type=click.STRING)
@click.option("--yes", is_flag=True)
@with_appcontext
def remove_stufe_command(name, yes):
"""Entfernt eine Stufe und alle mit ihr verknüpften Daten von der Datenbank."""
stufe = Stufe.query.filter_by(name=name).first()
if stufe is None:
click.echo("Fehler: Diese Stufe existiert nicht.", err=True)
return 1
if not yes:
if not click.confirm(f"Durch diesen Vorgang werden alle mit der Stufe {stufe.name} verknüpften Daten gelöscht. "
f"Fortfahren?"):
click.echo("Vorgang abgebrochen.")
return 0
db.session.delete(stufe)
db.session.commit()
click.echo("Die Stufe wurde erfolgreich entfernt.")
return 0
@click.command("add-koopschule")
@click.argument("kuerzel", type=click.STRING)
@click.argument("name", type=click.STRING)
@with_appcontext
def add_koopschule_command(kuerzel, name):
"""Fügt eine Koop-Schule zur Datenbank hinzu."""
koop_schule = Koopschule.query.filter_by(name=name).first()
if koop_schule is not None:
click.echo(f"Fehler: Eine Koop-Schule mit dem Kürzel {kuerzel} existiert bereits.", err=True)
return 1
new_koop_schule = Koopschule(kuerzel=kuerzel, name=name)
db.session.add(new_koop_schule)
db.session.commit()
click.echo("Die Koop-Schule wurde erfolgreich hinzugefügt.")
return 0
@click.command("remove-koopschule")
@click.argument("kuerzel", type=click.STRING)
@with_appcontext
def remove_koopschule_command(kuerzel):
"""Entfernt eine Koop-Schule und alle mit ihr verknüpften Daten von der Datenbank."""
koop_schule = Koopschule.query.filter_by(kuerzel=kuerzel).first()
if koop_schule is None:
click.echo(f"Fehler: DEine Koop-Schule mit dem Kürzel {kuerzel} existiert nicht.", err=True)
return 1
db.session.delete(koop_schule)
db.session.commit()
click.echo("Die Koop-Schule wurde erfolgreich entfernt.")
return 0
@click.command("make-admin")
@click.argument("kuerzel")
@with_appcontext
def make_admin_command(kuerzel):
"""Gibt einem/einer Lehrer(in) Administratorrechte."""
lehrer = Lehrer.query.filter_by(kuerzel=kuerzel).first()
if lehrer is None:
click.echo("Fehler: Das angegebene Kürzel ist nicht registriert.", err=True)
return 1
if lehrer.is_admin:
click.echo(kuerzel + " ist bereits Administrator.")
return 0
lehrer.is_admin = True
db.session.commit()
click.echo(kuerzel + " ist jetzt Administrator.")
return 0
@click.command("take-admin")
@click.argument("kuerzel")
@with_appcontext
def take_admin_command(kuerzel):
"""Nimmt einem/einer Lehrer(in) seine/ihre Administratorrechte."""
lehrer = Lehrer.query.filter_by(kuerzel=kuerzel).first()
if lehrer is None:
click.echo("Fehler: Das angegebene Kürzel ist nicht registriert.", err=True)
return 1
if not lehrer.is_admin:
click.echo(kuerzel + " ist bereits kein Administrator.")
return 0
lehrer.is_admin = False
db.session.commit()
click.echo(kuerzel + " ist jetzt kein Administrator mehr.")
return 0
@click.command("cleanup")
@with_appcontext
def cleanup_command():
"""Entfernt abgelaufene Daten aus der NateMan-Datenbank."""
Session.cleanup()
Lehrer.password_reset_cleanup()
db.session.commit()
return 0
@click.command("send-reminder-mails")
@with_appcontext
def send_reminder_mails_command():
"""Sendet Erinnerungsemails an alle Lehrer(innen), die unbearbeitete vergangene Klausuren haben."""
emails.send_reminder_mails()
return 0
@click.command("apply-email-format")
@click.option("-f", "--format", "fmt", type=click.STRING, default=None)
@click.option("-o", "--override", is_flag=True)
@with_appcontext
def apply_email_format_command(fmt, override):
"""Wendet das E-Mail-Adressen-Format auf Lehrer an."""
fmt = fmt or config.get("email-address-format", None)
if fmt is None:
click.echo("Fehler: Ein Format ist weder konfiguriert, noch wurde eines angegeben.", err=True)
return 1
query = Lehrer.query if override else Lehrer.query.filter_by(email=None)
lehrer = query.all()
for l in lehrer:
l.set_default_email_address(fmt)
db.session.commit()
return 0
def init_commands():
cli.add_command(add_lehrer_command)
cli.add_command(make_admin_command)
cli.add_command(take_admin_command)
cli.add_command(add_stufe_command)
cli.add_command(remove_stufe_command)
cli.add_command(add_koopschule_command)
cli.add_command(remove_koopschule_command)
cli.add_command(send_reminder_mails_command)
cli.add_command(apply_email_format_command)
cli.add_command(cleanup_command)
init_commands()
+56
View File
@@ -0,0 +1,56 @@
# NateMan Nachschreibtermin-Manager
# config_manager.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält Funktionen zum Laden/Erstellen der Konfigurationsdatei.
"""
import os
from shutil import copyfile
import yaml
config: dict = {}
def read_config_file(app):
"""Liest die Konfigurationsdatei."""
with open(os.path.join(app.instance_path, "config.yml"), "r", encoding="utf-8") as yaml_file:
yamlobj = yaml.safe_load(yaml_file)
if not isinstance(yamlobj, dict):
raise RuntimeError(f"Invalid config file: yaml.load returned an object "
f"of type {type(yamlobj).__name__} instead of a dict")
config.clear()
config.update(yamlobj)
def create_config_file(app) -> str:
"""Initialisiert die Konfigurationsdatei und gibt den Pfad der neuen Datei zurück."""
new_file_path = os.path.join(app.instance_path, "config.yml")
copyfile(
os.path.join(app.root_path, "resources", "default-config.yml"),
new_file_path
)
return new_file_path
def config_file_exists(app) -> bool:
"""Überprüft, ob die Konfigurationsdatei existiert."""
return os.path.isfile(
os.path.join(app.instance_path, "config.yml")
)
+152
View File
@@ -0,0 +1,152 @@
# NateMan Nachschreibtermin-Manager
# emails.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält Funktionen für den E-Mail-Versand.
"""
import smtplib
from datetime import datetime
from email.mime.text import MIMEText
from typing import Optional, Union
from flask import current_app, render_template
from sqlalchemy.sql.elements import and_
from .config_manager import config
from .models import Klausur, Lehrer
def _smtp_create() -> Union[smtplib.SMTP, smtplib.SMTP_SSL]:
"""Erstellt die der Konfiguration entsprechende SMTP-Instanz und verbindet zum SMTP-Server."""
logger = current_app.logger
logger.debug("Stellt Verbindung zum SMTP-Server her...")
smtp_constr = smtplib.SMTP_SSL if config["mail"]["use-ssl"] else smtplib.SMTP
smtp = smtp_constr(config["mail"]["smtp"]["hostname"], config["mail"]["smtp"]["hostport"])
smtp.login(config["mail"]["smtp"]["user"], config["mail"]["smtp"]["password"])
logger.debug("Erfolgreich mit SMTP-Server verbunden.")
return smtp
def _send_mail(address: str, subject: str, content: str, content_type="html", content_charset="utf-8",
smtp: Optional[smtplib.SMTP] = None) -> None:
"""
Sendet eine E-Mail mit den in der NateMan-Konfiguration angegebenen SMTP-Daten.
:param address: Adresse, zu der die E-Mail gesendet werden soll
:param subject: Betreff der E-Mail
:param content: Inhalt der E-Mail
:param content_type: Inhaltstyp der E-Mail
:param content_charset: Zeichensatz des E-Mail-Inhalts
:param smtp: SMTP-Verbindung. Falls keine Verbindung angegeben wird, wird eine erstellt
(und nach dem E-Mail-Versand geschlossen).
"""
logger = current_app.logger
sender_address = config["mail"]["sender-address"]
msg = MIMEText(content, content_type, content_charset)
msg["From"] = f"NateMan <{sender_address}>"
msg["Subject"] = subject
smtp_param = smtp is not None
if not smtp_param:
smtp = _smtp_create()
logger.debug(f"E-Mail wird an {address} versandt...")
try:
smtp.sendmail(sender_address, address, msg.as_string())
except smtplib.SMTPRecipientsRefused as exc:
if not smtp_param:
smtp.close()
logger.debug(f"E-Mail an {address} konnte nicht versandt werden "
f"(wahrscheinlich ungültige Adresse).", exc_info=exc)
raise
else:
logger.debug(f"E-Mail an {address} erfolgreich versandt.")
if not smtp_param:
smtp.close()
def send_confirmation_link_mail(address: str, token: str) -> None:
"""Sendet die Bestätigungsemail nach dem Festlegen der E-Mail-Adresse."""
content = render_template("email/confirmation.html.j2", token=token)
_send_mail(address, "NateMan: Bestätigung der E-Mail-Adresse", content)
def send_password_reset_mail(address: str, token: str) -> None:
"""Sendet die Passwortzurücksetzungsemail."""
content = render_template("email/password-reset.html.j2", token=token)
_send_mail(address, "NateMan: Passwortzurücksetzung", content)
def send_reminder_mails() -> int:
"""
Sendet Erinnerungsemails an alle Lehrer, die unbearbeitete vergangene Klausuren haben.
:return: Anzahl der E-Mails, die nicht versandt werden konnten
"""
logger = current_app.logger
logger.info("Startet den Versand von Erinnerungsemails...")
# SMTP-Connect
smtp = _smtp_create()
fail_count = 0
for lehrer in Lehrer.query.all():
not_edited_list = Klausur.query \
.filter(and_(Klausur.date <= datetime.now().date(), Klausur.lehrer == lehrer, ~Klausur.edited)) \
.order_by(Klausur.date.desc()).all()
if len(not_edited_list) == 0:
fail_count += 1
continue
if lehrer.email is None:
fail_count += 1
logger.info(f"Erinnerungsemail an {lehrer} konnte nicht versandt werden, da für diesen Lehrer keine "
f"E-Mail-Adresse eingetragen ist.")
continue
if not lehrer.is_confirmed:
fail_count += 1
logger.info(f"Erinnerungsemail an {lehrer} konnte nicht versandt werden, da die E-Mail-Adresse dieses "
f"Lehrers ({lehrer.email}) nicht bestätigt ist.")
continue
content = render_template("email/reminder.html.j2", not_edited_list=not_edited_list)
try:
_send_mail(lehrer.email, "NateMan: zur Erinnerung", content, smtp=smtp)
except smtplib.SMTPRecipientsRefused as exc:
logger.info(f"Erinnerungsemail an {lehrer} mit der Adresse {lehrer.email} konnte nicht versandt werden "
f"(wahrscheinlich ungültige Adresse).", exc_info=exc)
else:
logger.info(f"Erinnerungsemail an {lehrer} erfolgreich versandt.")
smtp.close()
if fail_count == 0:
logger.info("Versand von Erinnerungsemails abgeschlossen.")
else:
logger.info(f"Versand von Erinnerungsemails abgeschlossen. "
f"{fail_count} E-Mail(s) konnten nicht versandt werden.")
return fail_count
+105
View File
@@ -0,0 +1,105 @@
# NateMan Nachschreibtermin-Manager
# exporter.py
# Copyright © 2020 Johannes Bingel
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from typing import Iterable, Optional
from openpyxl import Workbook
from openpyxl.styles import Font
from nateman import assigner
from .models import Klausur, Klausurteilnahme, Schueler, Stufe
def excelexport(filepath: str, stufen: Optional[Iterable[Stufe]] = None):
# Intiziert die Exceldatei
workbook = Workbook()
# Holt sich alle Stufen falls keinen Angegeben sind
if stufen is None:
stufen = Stufe.query.all()
# exstellt für jede Stufe ein Excelsheet
for s in stufen:
# Holt sich alle vNachschreiben in eine List aus der Datenbank
k_schueler = Klausurteilnahme.query.join(Klausur).join(Schueler).filter(Klausurteilnahme.versaeumt) \
.filter(~Klausurteilnahme.nachgeschrieben).filter(Klausur.stufe == s) \
.order_by(Schueler.nachname, Schueler.vorname).all()
# Holt sich die Zuordnugsvoschläge
suggestions = assigner.zuordnen(k_schueler)
# Initialisiert das Excelsheet
workbook.create_sheet(s.name)
worksheet = workbook[s.name]
# Fügt die Schüle in die Exceltabelle ein.
if len(k_schueler) != 0:
worksheet.cell(1, 1, "Nr")
worksheet.cell(1, 2, "Name")
worksheet.cell(1, 3, "Vorname")
worksheet.cell(1, 4, "Kurs")
worksheet.cell(1, 5, "Lehrer")
worksheet.cell(1, 6, "Dauer [min]")
worksheet.cell(1, 7, "Attest")
if suggestions is None:
worksheet.cell(1, 8, "Bemerkung")
else:
worksheet.cell(1, 8, "Termin(Vorschlag)")
worksheet.cell(1, 9, "Bemerkung")
i = 0
while i < len(k_schueler):
worksheet.cell(i + 2, 1, i + 1)
worksheet.cell(i + 2, 2, k_schueler[i].schueler.nachname)
worksheet.cell(i + 2, 3, k_schueler[i].schueler.vorname)
worksheet.cell(i + 2, 4, k_schueler[i].klausur.kursname)
worksheet.cell(i + 2, 5, str(k_schueler[i].klausur.lehrer.kuerzel))
worksheet.cell(i + 2, 6, k_schueler[i].klausur.laenge)
if k_schueler[i].attestiert:
worksheet.cell(i + 2, 7, "Ja")
else:
worksheet.cell(i + 2, 7, "Nein")
nichtgefunden = True
if suggestions is not None:
for i2 in range(0, len(suggestions)):
if k_schueler[i] in suggestions[i2]:
worksheet.cell(i + 2, 8, i2 + 1)
nichtgefunden = False
if nichtgefunden:
worksheet.cell(i + 2, 8, "problem")
nichtgefunden = True
worksheet.cell(i + 2, 9, k_schueler[i].klausur.annotation)
else:
worksheet.cell(i + 2, 8, k_schueler[i].klausur.annotation)
i += 1
del i
del nichtgefunden
else:
bold = Font(bold=True)
worksheet.cell(1, 1, "Keine Schüler fehlen")
worksheet.cell(1, 1, ).font = bold
workbook.remove(workbook["Sheet"])
workbook.close()
workbook.save(filepath)
+218
View File
@@ -0,0 +1,218 @@
# NateMan Nachschreibtermin-Manager
# importer.py
# Copyright © 2020 Niklas Elsbrock und Johannes Bingel
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält Funktionen zum Import von Daten.
"""
from datetime import datetime
from typing import TextIO, SupportsInt, Union
import bcrypt
from openpyxl import load_workbook
from sqlalchemy.sql import and_, exists
from xml.dom import minidom
from . import util
from .config_manager import config
from .models import Klausur, Klausurteilnahme, Lehrer, Schueler, Stufe, db, get_next_new_schueler_id, Koopschule
class KlausurplanImportError(Exception):
"""Beim Versuch, einen Klausurplan zu importieren aufgrund einer ungültigen Klausurdatei aufgetretener Fehler"""
pass
class KoopSchuelerImportError(Exception):
"""Beim Versuch, Koop-Schueler zu importieren aufgrund einer ungültigen Klausurdatei aufgetretener Fehler"""
pass
def _nbit_int(x: Union[str, bytes, SupportsInt], base=10, maxbits=32):
result = int(x, base)
if result.bit_length() > maxbits:
raise ValueError(f"integer exceeds {maxbits}-bit limit")
return result
def import_plan(xml_file: TextIO, stufe: Stufe, new_lehrer_pwd: str) -> None:
"""
Importiert eine Klausurliste aus dem gegebenen XML-Klausurexport für die angegebene Stufe.
Registriert noch nicht registrierte Lehrer mit dem angegebenen Passwort.
von Niklas Elsbrock
:param xml_file: zu importierende XML-Datei
:param stufe: Stufe, für die die
:param new_lehrer_pwd: Passwort für neu registrierte Lehrerkonten
"""
assert util.validate_bcrypt_password(new_lehrer_pwd)
# Importdatum setzen
stufe.import_date = datetime.now().date()
new_lehrer_pwd_hash = bcrypt.hashpw(new_lehrer_pwd.encode("utf-8"), bcrypt.gensalt())
xmldoc = minidom.parse(xml_file)
# Klausurschienen durchgehen
for termin in xmldoc.getElementsByTagName("KLAUSURSCHIENE"):
date = datetime.strptime(termin.attributes["Datum"].value, "%d.%m.%Y").date()
startperiod = _nbit_int(termin.attributes["VonStd"].value)
endperiod = _nbit_int(termin.attributes["BisStd"].value)
if startperiod < 0 or startperiod > endperiod:
raise KlausurplanImportError(f"Zu importierender Plan für die Stufe {stufe.name} enthält ungültigen "
f"Zeitraum (Termin: {util.format_date(date)}; VonStd: {startperiod} BisStd: "
f"{endperiod})")
if db.session.query(exists().where(and_(Klausur.date == date, Klausur.stufe == stufe))).scalar():
raise KlausurplanImportError(f"Zu importierender Plan für die {stufe.name} enthält zwei Klausurtermine "
f"(Klausurschienen) für dasselbe Datum.")
# Kurse dieser Schiene durchgehen
for kurs in termin.getElementsByTagName("KURS"):
kursname = kurs.attributes["Bez"].value
kurs_lehrerkuerzel = kurs.attributes["Lehrer"].value
# eventuell bereits registrierten Lehrer bekommen
kurs_lehrer_entity = Lehrer.query.filter_by(kuerzel=kurs_lehrerkuerzel).first()
# Falls der Lehrer noch nicht registriert ist, registrieren
if kurs_lehrer_entity is None:
kurs_lehrer_entity = Lehrer(kuerzel=kurs_lehrerkuerzel, is_confirmed=True, pwd_hash=new_lehrer_pwd_hash)
# Falls ein E-Mailadressenformat konfiguriert ist, dieses nutzen.
email_address_format = config.get("email-address-format", None)
if email_address_format is not None:
kurs_lehrer_entity.set_default_email_address(email_address_format)
db.session.add(kurs_lehrer_entity)
klausur_entity = Klausur(kursname=kursname, date=date, startperiod=startperiod, endperiod=endperiod,
stufe=stufe, lehrer=kurs_lehrer_entity)
db.session.add(klausur_entity)
# Schüler dieses Kurses durchgehen
for schueler in kurs.getElementsByTagName("SCHUELER"):
schueler_dbid = _nbit_int(schueler.attributes["DbIdnr"].value)
schueler_nachname = schueler.attributes["Name"].value.strip()
schueler_vorname = schueler.attributes["Vorname"].value.strip()
# eventuell bereits eingetragenen Schüler bekommen
schueler_entity = Schueler.query.filter_by(id=schueler_dbid).first()
# Falls der Schüler noch nicht eingetragen ist, eintragen
if schueler_entity is None:
schueler_entity = Schueler(id=schueler_dbid, nachname=schueler_nachname,
vorname=schueler_vorname, stufe=stufe)
db.session.add(schueler_entity)
else:
# Ist dieser Schüler bereits für eine andere Stufe eingetragen? -> Fehler
if schueler_entity.stufe != stufe:
raise KlausurplanImportError(f"Zu importierender Plan für die {stufe.name} enthält Schüler(in) "
f"({schueler_vorname} {schueler_nachname}, "
f"DbIdNr: {schueler_dbid}), der/die bereits für die "
f"{schueler_entity.stufe.name} eingetragen ist.")
# Ist derselbe Schüler bereits in dieser Klausur? -> Fehler
if db.session.query(exists().where(and_(Klausurteilnahme.schueler == schueler_entity,
Klausurteilnahme.klausur == klausur_entity))).scalar():
raise KlausurplanImportError(f"Zu importierender Plan für die {stufe.name} enthält selbe(n) "
f"Schüler(in) ({schueler_vorname} {schueler_nachname}, "
f"DbIdNr: {schueler_dbid}) mehrfach in "
f"derselben Klausur ({kursname}).")
# Falls der Schüler die Klausur mitschreibt, zur Klausur hinzufügen
if schueler.attributes["Klausurschreiber"].value == "j":
klausurteilnahme = Klausurteilnahme(klausur=klausur_entity, schueler=schueler_entity)
db.session.add(klausurteilnahme)
# Von Johannes
def excelimport(filepath: str):
# Initialisiert Startdaten
if Stufe.import_date is not None:
workbook = load_workbook(filepath)
worksheet = workbook["Datenblatt"]
schueler = []
exceptions = []
# Holt die Daten der Schüler aus der Exceltabelle
i = 10
while worksheet.cell(row=i, column=3).value is not None and worksheet.cell(row=i + 1,
column=3).value is not None:
if worksheet.cell(row=i, column=3).value is not None:
schueler.append([worksheet.cell(row=i, column=6).value, worksheet.cell(row=i, column=3).value,
worksheet.cell(row=i, column=4).value])
i += 1
# Spalten die Daten in ihre Bestandteile
i = 0
i2 = 0
i3 = 0
while i < len(schueler):
while i2 < len(schueler[i][0]):
if schueler[i][0][i2] == ",":
break
i2 += 1
while i3 < len(schueler[i][1]):
if schueler[i][1][i3] == " ":
break
i3 += 1
schueler[i] = [schueler[i][0][:i2], schueler[i][0][i2 + 2:], schueler[i][1][:i3], schueler[i][1][i3 + 2:-1],
schueler[i][2]]
i2 = 0
i3 = 0
i += 1
# s 0 Nachname, 1 Vorname, 2 Fach , 3 Lehrer, 4 KOOP_Schuhle
# Erstellt für jeden schüler einen Eintrag und prüft ob die Lks und Koopschulen existieren
for s in schueler:
if s[2] == "E":
s[2] = "E5"
klausuren = Klausur.query.join(Lehrer).filter(Lehrer.kuerzel == s[3]).all()
i = 0
while i < len(klausuren):
if klausuren[i].kursname[:-2] in ((str(s[2]) + suffix) for suffix in ("-L", " L")):
i += 1
else:
klausuren.pop(i)
if len(klausuren) > 0:
schueler_entity = Schueler(id=get_next_new_schueler_id(), nachname=s[0], vorname=s[1],
stufe=klausuren[0].stufe)
schule_entity = Koopschule.query.filter_by(kuerzel=s[4]).first()
if schule_entity is not None:
schueler_entity.stammschule = schule_entity
for klausur in klausuren:
teilnahme_entity = Klausurteilnahme(klausur=klausur, schueler=schueler_entity)
db.session.add(schueler_entity)
db.session.add(teilnahme_entity)
else:
raise KoopSchuelerImportError("Für den/die Schüler(in) " + s[0] + ", " + s[1]
+ "konnte keine Koopschule mit dem Kürzel " + s[4]
+ " gefunden werden.")
else:
exceptions.append(s)
return exceptions
else:
raise KoopSchuelerImportError("Für die Stufe ist noch kein Klausurplan importiert")
+275
View File
@@ -0,0 +1,275 @@
# NateMan Nachschreibtermin-Manager
# models.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält die SQLAlchemy-Modelle.
"""
from datetime import datetime, timedelta
from sqlite3 import Connection as Sqlite3_Connection
from typing import Optional, Tuple, Union, AnyStr
import bcrypt
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy import CheckConstraint
from sqlalchemy.engine import Engine
from sqlalchemy.sql import func
from . import util
from .config_manager import config
db: SQLAlchemy = SQLAlchemy()
class Klausurteilnahme(db.Model):
klausur_id = db.Column(db.Integer, db.ForeignKey("klausur.id", onupdate="CASCADE", ondelete="CASCADE"),
primary_key=True)
schueler_id = db.Column(db.Integer, db.ForeignKey("schueler.id", onupdate="CASCADE", ondelete="CASCADE"),
primary_key=True)
versaeumt = db.Column(db.Boolean, default=False, nullable=False)
attestiert = db.Column(db.Boolean, default=False, nullable=False)
nachgeschrieben = db.Column(db.Boolean, default=False, nullable=False)
klausur = db.relationship("Klausur", lazy="joined")
schueler = db.relationship("Schueler", lazy="joined")
class Stufe(db.Model):
name = db.Column(db.String(), primary_key=True)
import_date = db.Column(db.Date(), default=None)
class Schueler(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
nachname = db.Column(db.String(collation="NOCASE"), nullable=False)
vorname = db.Column(db.String(collation="NOCASE"), nullable=False)
stufe_name = db.Column(db.String(), db.ForeignKey("stufe.name", onupdate="CASCADE", ondelete="CASCADE"),
nullable=False)
stammschule_name = db.Column(db.String(),
db.ForeignKey("koopschule.kuerzel", onupdate="CASCADE", ondelete="CASCADE"))
stufe = db.relationship("Stufe", lazy="select")
stammschule = db.relationship("Koopschule", lazy="select")
def __str__(self):
return f"{self.nachname}, {self.vorname} ({self.stufe.name}, ID:{self.id})"
class Lehrer(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
kuerzel = db.Column(db.String(collation="NOCASE"), unique=True, nullable=False)
email = db.Column(db.String())
is_confirmed = db.Column(db.Boolean, default=False, nullable=False)
pwd_hash = db.Column(db.String(), nullable=False)
is_admin = db.Column(db.Boolean, default=False, nullable=False)
beraet_name = db.Column(db.String(), db.ForeignKey("stufe.name", onupdate="CASCADE", ondelete="SET NULL"))
pwd_changed = db.Column(db.Boolean, default=False, nullable=False)
confirmation_token = db.Column(db.String(), unique=True)
password_reset_token = db.Column(db.String(), unique=True)
password_reset_expiry = db.Column(db.DateTime)
beraet = db.relationship("Stufe", lazy="select")
@staticmethod
def password_reset_cleanup() -> None:
"""
Entfernt alle abgelaufenen Passwortzurücksetzungsanfragen aus der Datenbank.
"""
Lehrer.query.filter(Lehrer.password_reset_expiry < datetime.utcnow()) \
.update({Lehrer.password_reset_token: None, Lehrer.password_reset_expiry: None})
def __str__(self):
return f"{self.kuerzel} (ID:{self.id})"
def can_access(self, stufe: Optional[Stufe] = None) -> bool:
"""
Überprüft, ob dieser Lehrer erweiterten Zugriff auf die angegebene Stufe hat
(d.h. ob er Administrator oder Beratungslehrer der angegebenen Stufe ist).
Wenn die Stufe ``None`` ist, wird überprüft, ob dieser Lehrer
Administrator oder Beratungslehrer irgendeiner Stufe ist.
:return: ``True`` falls ja, ``False`` falls nicht
"""
if self.is_admin:
return True
# ELSE
if stufe is None:
return self.beraet is not None
# ELSE
return self.beraet == stufe
def accessible_stufen(self, names: bool = False) -> Union[Tuple[Stufe, ...], Tuple[AnyStr, ...]]:
"""
:param names: Falls ``True``, werden die Namen der Stufen anstelle der Stufenobjekte zurückgegeben
:return: Tupel mit allen Stufen, auf die dieser Lehrer erweiterten Zugriff hat
"""
stufen = Stufe.query.all()
if self.is_admin:
return tuple(stufen) if not names else tuple(s.name for s in stufen)
# ELSE
if self.beraet:
return (self.beraet,) if not names else (self.beraet.name,)
# ELSE
return ()
def set_password(self, new_password: str, set_pwd_changed=True) -> None:
"""
Legt das neue Passwort des Lehrers fest.
:param new_password: neues Passwort
:param set_pwd_changed: legt fest, ob der ``pwd_changed``-Eintrag in der Datenbank angepasst werden soll
"""
assert util.validate_bcrypt_password(new_password)
self.pwd_hash = bcrypt.hashpw(new_password.encode("utf-8"), bcrypt.gensalt())
if set_pwd_changed:
self.pwd_changed = True
def check_password(self, password) -> bool:
"""
Vergleicht ``password`` mit dem Passwort des Lehrers.
:param password: zu überprüfendes Passwort
:return: ``True`` falls die Passwörter übereinstimmen, ``False`` falls nicht
"""
return bcrypt.checkpw(password.encode("utf-8"), self.pwd_hash)
def set_default_email_address(self, fmt) -> bool:
email_address = fmt.replace("?", util.email_address_safe(self.kuerzel))
if util.EMAIL_ADDRESS_REGEX.match(email_address):
self.email = email_address
self.is_confirmed = True
return True
return False
class Klausur(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
kursname = db.Column(db.String(collation="NOCASE"), nullable=False)
date = db.Column(db.Date, nullable=False)
startperiod = db.Column(db.Integer, nullable=False)
endperiod = db.Column(db.Integer, nullable=False)
laenge = db.Column(db.Integer, default=None)
edited = db.Column(db.Boolean, default=False, nullable=False)
annotation = db.Column(db.String())
stufe_name = db.Column(db.String(), db.ForeignKey("stufe.name", onupdate="CASCADE", ondelete="CASCADE"),
nullable=False)
lehrer_id = db.Column(db.Integer, db.ForeignKey("lehrer.id", onupdate="CASCADE", ondelete="CASCADE"),
nullable=False)
stufe = db.relationship("Stufe", lazy="select")
lehrer = db.relationship("Lehrer", lazy="joined")
__table_args__ = (
CheckConstraint("startperiod >= 0"),
CheckConstraint("startperiod <= endperiod")
)
def __str__(self):
return f"{self.kursname}, {self.stufe.name} (ID:{self.id})"
def date_formatted(self) -> str:
"""
:return: Klausurdatum als String im Format WW, DD.MM.YYYY (siehe util.format_date)
"""
return util.format_date(self.date)
def is_bygone(self):
"""
:return: ``True``, falls diese Klausur vergangen ist, ``False``, falls nicht
"""
return self.date <= datetime.now().date()
class Koopschule(db.Model):
kuerzel = db.Column(db.String(), primary_key=True)
name = db.Column(db.String())
class Session(db.Model):
key = db.Column(db.String(), primary_key=True)
expiry = db.Column(db.DateTime, nullable=False)
lehrer_id = db.Column(db.Integer, db.ForeignKey("lehrer.id", onupdate="CASCADE", ondelete="CASCADE"),
nullable=False)
lehrer = db.relationship("Lehrer", lazy="joined")
@staticmethod
def get(key: str) -> Optional["Session"]:
"""
Gibt die Sitzung zurück, die zum Key gehört oder ``None``,
falls keine Sitzung mit dem Key existiert oder die Sitzung abgelaufen ist.
:param key: Sitzungs-Key
:return: Sitzung
"""
session = Session.query.filter_by(key=key).first()
if session is not None and session.expired():
return None
return session
@staticmethod
def create(lehrer: Lehrer, expiry_delta: timedelta) -> "Session":
"""
Erstellt eine neue Sitzung für den Lehrer ``lehrer``.
:param lehrer: Lehrer, für den eine Sitzung erstellt werden soll
:param expiry_delta: Zeitraum, nach dem die Sitzung ablaufen soll
:return: neue Sitzung
"""
new_session = Session(key=util.random_uri_safe_string(64), expiry=datetime.utcnow() + expiry_delta,
lehrer=lehrer)
db.session.add(new_session)
return new_session
@staticmethod
def cleanup() -> None:
"""
Entfernt alle abgelaufenen Sitzungen aus der Datenbank.
"""
Session.query.filter(Session.expiry < datetime.utcnow()).delete()
def expired(self) -> bool:
"""
Überprüft, ob die Sitzung abgelaufen ist.
"""
return self.expiry < datetime.utcnow()
@db.event.listens_for(Engine, "connect")
def set_sqlite_pragma(dbapi_connection, connection_record):
"""
Falls SQLite verwendet wird, wird bei jedem Verbindungsaufbau zur Datenbank ``foreign_keys`` aktiviert, damit
Fremdschlüssel richtig funktionieren.
Von https://stackoverflow.com/questions/4477269.
"""
if type(dbapi_connection) is Sqlite3_Connection:
cursor = dbapi_connection.cursor()
cursor.execute("PRAGMA foreign_keys=ON")
cursor.close()
def get_next_new_schueler_id():
"""
:return: ID, die der nächste manuell hinzugefügte Schüler haben soll
"""
lowest_id = db.session.query(func.min(Schueler.id).label("min_id")).one().min_id
if lowest_id is None or lowest_id > -1:
return -1
# ELSE
return lowest_id - 1
+67
View File
@@ -0,0 +1,67 @@
# Konfiguration der NateMan-Webanwendung.
# Name, unter dem der Webserver normalerweise erreicht wird
server-name: "nateman.example.com"
# Benutzt der Webserver SSL (HTTPS)?
uses-ssl: No
# Passwort, das standardmäßig als Passwort für neu reistrierte Lehrer verwendet wird
default-new-lehrer-password: ""
# Format für E-Mail-Adressen neu hinzugefügter Lehrer.
# Fragezeichen werden durch das jeweilige Kürzel des neuen Lehrers ersetzt.
# Auskommentieren zum Deaktivieren.
# Beispiel: email-address-format: "?@example.com"
#email-address-format: ""
schule:
# Name der Schule
name: "Max-Mustermann-Schule"
# URL zur Website der Schule
website-url: "https://example.com/"
# Optional: URL zum Schullogo.
# Optimal ist ein PNG-Bild mit maximal 100 Pixeln Höhe.
#logo-url
# Url zum Impressum
imprint-url: "https://example.com/impressum"
# Url zur Datenschutzerklärung
privacy-policy-url: "https://example.com/datenschutz"
klausuren:
# Maximale Zeichenanzahl für Bemerkungen
max-annotation-length: 64
# Bei der Klausurbearbeitung auswählbare Klausurlängen.
# Bestehende Daten werden von einer Änderung nicht beeinflusst.
klausurlaengen:
- 45
- 60
- 135
- 180
# Logging-Einstellungen
logging:
# Logging-Level. Mögliche Werte: NOTSET, DEBUG, INFO, WARNING, ERROR, CRITICAL
level: "INFO"
# Legt fest, ob Lognachrichten zu syslog (/dev/log) gesendet werden sollen
syslog: No
# Mailserver-Einstellungen
mail:
# Addresse, von der von NateMan automatisch gesendete E-Mails ausgehen
sender-address: "nateman@example.com"
# Legt, ob SSL zur Verbindung zum SMTP-Server verwendet werden soll.
# Empfohlen, falls der SMTP-Server dies unterstützt.
use-ssl: Yes
# SMTP-Host- und Anmeldedaten
smtp:
hostname: "smtp.example.com"
hostport: 25
user: "nateman@example.com"
password: ""
@@ -0,0 +1,34 @@
Font Awesome Free License
-------------------------
Font Awesome Free is free, open source, and GPL friendly. You can use it for
commercial projects, open source projects, or really almost whatever you want.
Full Font Awesome Free license: https://fontawesome.com/license/free.
# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/)
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons
packaged as SVG and JS file types.
# Fonts: SIL OFL 1.1 License (https://scripts.sil.org/OFL)
In the Font Awesome Free download, the SIL OFL license applies to all icons
packaged as web and desktop font files.
# Code: MIT License (https://opensource.org/licenses/MIT)
In the Font Awesome Free download, the MIT license applies to all non-font and
non-icon files.
# Attribution
Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font
Awesome Free files already contain embedded comments with sufficient
attribution, so you shouldn't need to do anything additional when using these
files normally.
We've kept attribution comments terse, so we ask that you do not actively work
to remove them from files, especially code. They're a great way for folks to
learn about Font Awesome.
# Brand Icons
All brand icons are trademarks of their respective owners. The use of these
trademarks does not indicate endorsement of the trademark holder by Font
Awesome, nor vice versa. **Please do not use brand logos for any purpose except
to represent the company, product, or service to which they refer.**
Binary file not shown.
File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 889 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+94
View File
@@ -0,0 +1,94 @@
Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
with Reserved Font Name Lato.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

+714
View File
@@ -0,0 +1,714 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.2" width="297mm" height="175mm" viewBox="0 0 29700 17500" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:ooo="http://xml.openoffice.org/svg/export" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:presentation="http://sun.com/xmlns/staroffice/presentation" xmlns:smil="http://www.w3.org/2001/SMIL20/" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xml:space="preserve">
<defs class="ClipPathGroup">
<clipPath id="presentation_clip_path" clipPathUnits="userSpaceOnUse">
<rect x="0" y="0" width="29700" height="17500"/>
</clipPath>
<clipPath id="presentation_clip_path_shrink" clipPathUnits="userSpaceOnUse">
<rect x="29" y="17" width="29641" height="17465"/>
</clipPath>
</defs>
<defs>
<font id="EmbeddedFont_1" horiz-adv-x="2048">
<font-face font-family="Liberation Sans embedded" units-per-em="2048" font-weight="normal" font-style="normal" ascent="1852" descent="423"/>
<missing-glyph horiz-adv-x="2048" d="M 0,0 L 2047,0 2047,2047 0,2047 0,0 Z"/>
<glyph unicode="ö" horiz-adv-x="980" d="M 1053,542 C 1053,353 1011,212 928,119 845,26 724,-20 565,-20 490,-20 422,-9 363,14 304,37 254,71 213,118 172,165 140,223 119,294 97,364 86,447 86,542 86,915 248,1102 571,1102 655,1102 728,1090 789,1067 850,1044 900,1009 939,962 978,915 1006,857 1025,787 1044,717 1053,635 1053,542 Z M 864,542 C 864,626 858,695 845,750 832,805 813,848 788,881 763,914 732,937 696,950 660,963 619,969 574,969 528,969 487,962 450,949 413,935 381,912 355,879 329,846 309,802 296,747 282,692 275,624 275,542 275,458 282,389 297,334 312,279 332,235 358,202 383,169 414,146 449,133 484,120 522,113 563,113 609,113 651,120 688,133 725,146 757,168 783,201 809,234 829,278 843,333 857,388 864,458 864,542 Z M 689,1219 L 689,1403 852,1403 852,1219 689,1219 Z M 295,1219 L 295,1403 460,1403 460,1219 295,1219 Z"/>
<glyph unicode="ä" horiz-adv-x="1060" d="M 414,-20 C 305,-20 224,9 169,66 114,123 87,202 87,302 87,373 101,432 128,478 155,523 190,559 234,585 277,611 327,629 383,639 439,649 496,655 554,656 L 797,660 797,719 C 797,764 792,802 783,833 774,864 759,890 740,909 721,928 697,943 668,952 639,961 604,965 565,965 530,965 499,963 471,958 443,953 419,944 398,931 377,918 361,900 348,878 335,855 327,827 323,793 L 135,810 C 142,853 154,892 173,928 192,963 218,994 253,1020 287,1046 330,1066 382,1081 433,1095 496,1102 569,1102 705,1102 807,1071 876,1009 945,946 979,856 979,738 L 979,272 C 979,219 986,179 1000,152 1014,125 1041,111 1080,111 1090,111 1100,112 1110,113 1120,114 1130,116 1139,118 L 1139,6 C 1116,1 1094,-3 1072,-6 1049,-9 1025,-10 1000,-10 966,-10 937,-5 913,4 888,13 868,26 853,45 838,63 826,86 818,113 810,140 805,171 803,207 L 797,207 C 778,172 757,141 734,113 711,85 684,61 653,42 622,22 588,7 549,-4 510,-15 465,-20 414,-20 Z M 455,115 C 512,115 563,126 606,147 649,168 684,194 713,227 741,260 762,295 776,334 790,373 797,410 797,445 L 797,534 600,530 C 556,529 514,526 475,521 435,515 400,504 370,487 340,470 316,447 299,417 281,387 272,348 272,299 272,240 288,195 320,163 351,131 396,115 455,115 Z M 674,1219 L 674,1403 837,1403 837,1219 674,1219 Z M 280,1219 L 280,1403 445,1403 445,1219 280,1219 Z"/>
<glyph unicode="z" horiz-adv-x="928" d="M 49,0 L 49,137 710,943 89,943 89,1082 913,1082 913,945 251,139 950,139 950,0 49,0 Z"/>
<glyph unicode="y" horiz-adv-x="1033" d="M 604,0 C 579,-65 553,-124 527,-177 500,-229 471,-273 438,-311 405,-347 369,-376 329,-396 289,-415 243,-425 191,-425 168,-425 147,-424 128,-423 109,-422 88,-419 67,-414 L 67,-279 C 80,-282 94,-284 110,-284 126,-284 140,-284 151,-284 204,-284 253,-264 298,-225 343,-186 383,-124 417,-38 L 434,5 5,1082 197,1082 425,484 C 432,466 440,442 451,412 461,382 471,352 482,322 492,292 501,265 509,241 517,217 522,202 523,196 525,203 530,218 538,240 545,261 554,285 564,312 573,339 583,366 593,393 603,420 611,444 618,464 L 830,1082 1020,1082 604,0 Z"/>
<glyph unicode="x" horiz-adv-x="1006" d="M 801,0 L 510,444 217,0 23,0 408,556 41,1082 240,1082 510,661 778,1082 979,1082 612,558 1002,0 801,0 Z"/>
<glyph unicode="w" horiz-adv-x="1509" d="M 1174,0 L 965,0 792,698 C 787,716 781,738 776,765 770,792 764,818 759,843 752,872 746,903 740,934 734,904 728,874 721,845 716,820 710,793 704,766 697,739 691,715 686,694 L 508,0 300,0 -3,1082 175,1082 358,347 C 363,332 367,313 372,291 377,268 381,246 386,225 391,200 396,175 401,149 406,174 412,199 418,223 423,244 429,265 434,286 439,307 444,325 448,339 L 644,1082 837,1082 1026,339 C 1031,322 1036,302 1041,280 1046,258 1051,237 1056,218 1061,195 1067,172 1072,149 1077,174 1083,199 1088,223 1093,244 1098,265 1103,288 1108,310 1112,330 1117,347 L 1308,1082 1484,1082 1174,0 Z"/>
<glyph unicode="v" horiz-adv-x="1033" d="M 613,0 L 400,0 7,1082 199,1082 437,378 C 442,363 447,346 454,325 460,304 466,282 473,259 480,236 486,215 492,194 497,173 502,155 506,141 510,155 515,173 522,194 528,215 534,236 541,258 548,280 555,302 562,323 569,344 575,361 580,376 L 826,1082 1017,1082 613,0 Z"/>
<glyph unicode="u" horiz-adv-x="874" d="M 314,1082 L 314,396 C 314,343 318,299 326,264 333,229 346,200 363,179 380,157 403,142 432,133 460,124 495,119 537,119 580,119 618,127 653,142 687,157 716,178 741,207 765,235 784,270 797,312 810,353 817,401 817,455 L 817,1082 997,1082 997,231 C 997,208 997,185 998,160 998,135 998,111 999,89 1000,66 1000,47 1001,31 1002,15 1002,5 1003,0 L 833,0 C 832,3 832,12 831,27 830,42 830,59 829,78 828,97 827,116 826,136 825,155 825,172 825,185 L 822,185 C 805,154 786,125 765,100 744,75 720,53 693,36 666,18 634,4 599,-6 564,-15 523,-20 476,-20 416,-20 364,-13 321,2 278,17 242,39 214,70 186,101 166,140 153,188 140,236 133,294 133,361 L 133,1082 314,1082 Z"/>
<glyph unicode="t" horiz-adv-x="531" d="M 554,8 C 527,1 499,-5 471,-10 442,-14 409,-16 372,-16 228,-16 156,66 156,229 L 156,951 31,951 31,1082 163,1082 216,1324 336,1324 336,1082 536,1082 536,951 336,951 336,268 C 336,216 345,180 362,159 379,138 408,127 450,127 467,127 484,128 501,131 517,134 535,137 554,141 L 554,8 Z"/>
<glyph unicode="s" horiz-adv-x="901" d="M 950,299 C 950,248 940,203 921,164 901,124 872,91 835,64 798,37 752,16 698,2 643,-13 581,-20 511,-20 448,-20 392,-15 342,-6 291,4 247,20 209,41 171,62 139,91 114,126 88,161 69,203 57,254 L 216,285 C 231,227 263,185 311,158 359,131 426,117 511,117 550,117 585,120 618,125 650,130 678,140 701,153 724,166 743,183 756,205 769,226 775,253 775,285 775,318 767,345 752,366 737,387 715,404 688,418 661,432 628,444 589,455 550,465 507,476 460,489 417,500 374,513 331,527 288,541 250,560 216,583 181,606 153,634 132,668 111,702 100,745 100,796 100,895 135,970 206,1022 276,1073 378,1099 513,1099 632,1099 727,1078 798,1036 868,994 912,927 931,834 L 769,814 C 763,842 752,866 736,885 720,904 701,919 678,931 655,942 630,951 602,956 573,961 544,963 513,963 432,963 372,951 333,926 294,901 275,864 275,814 275,785 282,761 297,742 311,723 331,707 357,694 382,681 413,669 449,660 485,650 525,640 568,629 597,622 626,614 656,606 686,597 715,587 744,576 772,564 799,550 824,535 849,519 870,500 889,478 908,456 923,430 934,401 945,372 950,338 950,299 Z"/>
<glyph unicode="r" horiz-adv-x="530" d="M 142,0 L 142,830 C 142,853 142,876 142,900 141,923 141,946 140,968 139,990 139,1011 138,1030 137,1049 137,1067 136,1082 L 306,1082 C 307,1067 308,1049 309,1030 310,1010 311,990 312,969 313,948 313,929 314,910 314,891 314,874 314,861 L 318,861 C 331,902 344,938 359,969 373,999 390,1024 409,1044 428,1063 451,1078 478,1088 505,1097 537,1102 575,1102 590,1102 604,1101 617,1099 630,1096 641,1094 648,1092 L 648,927 C 636,930 622,933 606,935 590,936 572,937 552,937 511,937 476,928 447,909 418,890 394,865 376,832 357,799 344,759 335,714 326,668 322,618 322,564 L 322,0 142,0 Z"/>
<glyph unicode="p" horiz-adv-x="953" d="M 1053,546 C 1053,464 1046,388 1033,319 1020,250 998,190 967,140 936,90 895,51 844,23 793,-6 730,-20 655,-20 578,-20 510,-5 452,24 394,53 350,101 319,168 L 314,168 C 315,167 315,161 316,150 316,139 316,126 317,110 317,94 317,76 318,57 318,37 318,17 318,-2 L 318,-425 138,-425 138,861 C 138,887 138,912 138,936 137,960 137,982 136,1002 135,1021 135,1038 134,1052 133,1066 133,1076 132,1082 L 306,1082 C 307,1080 308,1073 309,1061 310,1049 311,1035 312,1018 313,1001 314,982 315,963 316,944 316,925 316,908 L 320,908 C 337,943 356,972 377,997 398,1021 423,1041 450,1057 477,1072 508,1084 542,1091 575,1098 613,1101 655,1101 730,1101 793,1088 844,1061 895,1034 936,997 967,949 998,900 1020,842 1033,774 1046,705 1053,629 1053,546 Z M 864,542 C 864,609 860,668 852,720 844,772 830,816 811,852 791,888 765,915 732,934 699,953 658,962 609,962 569,962 531,956 496,945 461,934 430,912 404,880 377,848 356,804 341,748 326,691 318,618 318,528 318,451 324,387 337,334 350,281 368,238 393,205 417,172 447,149 483,135 519,120 560,113 607,113 657,113 699,123 732,142 765,161 791,189 811,226 830,263 844,308 852,361 860,414 864,474 864,542 Z"/>
<glyph unicode="o" horiz-adv-x="980" d="M 1053,542 C 1053,353 1011,212 928,119 845,26 724,-20 565,-20 490,-20 422,-9 363,14 304,37 254,71 213,118 172,165 140,223 119,294 97,364 86,447 86,542 86,915 248,1102 571,1102 655,1102 728,1090 789,1067 850,1044 900,1009 939,962 978,915 1006,857 1025,787 1044,717 1053,635 1053,542 Z M 864,542 C 864,626 858,695 845,750 832,805 813,848 788,881 763,914 732,937 696,950 660,963 619,969 574,969 528,969 487,962 450,949 413,935 381,912 355,879 329,846 309,802 296,747 282,692 275,624 275,542 275,458 282,389 297,334 312,279 332,235 358,202 383,169 414,146 449,133 484,120 522,113 563,113 609,113 651,120 688,133 725,146 757,168 783,201 809,234 829,278 843,333 857,388 864,458 864,542 Z"/>
<glyph unicode="n" horiz-adv-x="874" d="M 825,0 L 825,686 C 825,739 821,783 814,818 806,853 793,882 776,904 759,925 736,941 708,950 679,959 644,963 602,963 559,963 521,956 487,941 452,926 423,904 399,876 374,847 355,812 342,771 329,729 322,681 322,627 L 322,0 142,0 142,851 C 142,874 142,898 142,923 141,948 141,971 140,994 139,1016 139,1035 138,1051 137,1067 137,1077 136,1082 L 306,1082 C 307,1079 307,1070 308,1055 309,1040 310,1024 311,1005 312,986 312,966 313,947 314,927 314,910 314,897 L 317,897 C 334,928 353,957 374,982 395,1007 419,1029 446,1047 473,1064 505,1078 540,1088 575,1097 616,1102 663,1102 723,1102 775,1095 818,1080 861,1065 897,1043 925,1012 953,981 974,942 987,894 1000,845 1006,788 1006,721 L 1006,0 825,0 Z"/>
<glyph unicode="m" horiz-adv-x="1457" d="M 768,0 L 768,686 C 768,739 765,783 758,818 751,853 740,882 725,904 709,925 688,941 663,950 638,959 607,963 570,963 532,963 498,956 467,941 436,926 410,904 389,876 367,847 350,812 339,771 327,729 321,681 321,627 L 321,0 142,0 142,851 C 142,874 142,898 142,923 141,948 141,971 140,994 139,1016 139,1035 138,1051 137,1067 137,1077 136,1082 L 306,1082 C 307,1079 307,1070 308,1055 309,1040 310,1024 311,1005 312,986 312,966 313,947 314,927 314,910 314,897 L 317,897 C 333,928 350,957 369,982 388,1007 410,1029 435,1047 460,1064 488,1078 521,1088 553,1097 590,1102 633,1102 715,1102 780,1086 828,1053 875,1020 908,968 927,897 L 930,897 C 946,928 964,957 984,982 1004,1007 1027,1029 1054,1047 1081,1064 1111,1078 1144,1088 1177,1097 1215,1102 1258,1102 1313,1102 1360,1095 1400,1080 1439,1065 1472,1043 1497,1012 1522,981 1541,942 1553,894 1565,845 1571,788 1571,721 L 1571,0 1393,0 1393,686 C 1393,739 1390,783 1383,818 1376,853 1365,882 1350,904 1334,925 1313,941 1288,950 1263,959 1232,963 1195,963 1157,963 1123,956 1092,942 1061,927 1035,906 1014,878 992,850 975,815 964,773 952,731 946,682 946,627 L 946,0 768,0 Z"/>
<glyph unicode="l" horiz-adv-x="187" d="M 138,0 L 138,1484 318,1484 318,0 138,0 Z"/>
<glyph unicode="k" horiz-adv-x="901" d="M 816,0 L 450,494 318,385 318,0 138,0 138,1484 318,1484 318,557 793,1082 1004,1082 565,617 1027,0 816,0 Z"/>
<glyph unicode="i" horiz-adv-x="187" d="M 137,1312 L 137,1484 317,1484 317,1312 137,1312 Z M 137,0 L 137,1082 317,1082 317,0 137,0 Z"/>
<glyph unicode="h" horiz-adv-x="874" d="M 317,897 C 337,934 359,965 382,991 405,1016 431,1037 459,1054 487,1071 518,1083 551,1091 584,1098 622,1102 663,1102 732,1102 789,1093 834,1074 878,1055 913,1029 939,996 964,962 982,922 992,875 1001,828 1006,777 1006,721 L 1006,0 825,0 825,686 C 825,732 822,772 817,807 811,842 800,871 784,894 768,917 745,934 716,946 687,957 649,963 602,963 559,963 521,955 487,940 452,925 423,903 399,875 374,847 355,813 342,773 329,733 322,688 322,638 L 322,0 142,0 142,1484 322,1484 322,1098 C 322,1076 322,1054 321,1032 320,1010 320,990 319,971 318,952 317,937 316,924 315,911 315,902 314,897 L 317,897 Z"/>
<glyph unicode="g" horiz-adv-x="927" d="M 548,-425 C 486,-425 431,-419 383,-406 335,-393 294,-375 260,-352 226,-328 198,-300 177,-267 156,-234 140,-198 131,-158 L 312,-132 C 324,-182 351,-220 392,-248 433,-274 486,-288 553,-288 594,-288 631,-282 664,-271 697,-260 726,-241 749,-217 772,-191 790,-159 803,-119 816,-79 822,-30 822,27 L 822,201 820,201 C 807,174 790,148 771,123 751,98 727,75 699,56 670,37 637,21 600,10 563,-2 520,-8 472,-8 403,-8 345,4 296,27 247,50 207,84 176,130 145,176 122,233 108,302 93,370 86,449 86,539 86,626 93,704 108,773 122,842 145,901 178,950 210,998 252,1035 304,1061 355,1086 418,1099 492,1099 569,1099 635,1082 692,1047 748,1012 791,962 822,897 L 824,897 C 824,914 825,933 826,953 827,974 828,994 829,1012 830,1031 831,1046 832,1060 833,1073 835,1080 836,1080 L 1007,1080 C 1006,1074 1006,1064 1005,1050 1004,1035 1004,1018 1003,998 1002,978 1002,956 1002,932 1001,907 1001,882 1001,856 L 1001,30 C 1001,-121 964,-234 890,-311 815,-387 701,-425 548,-425 Z M 822,541 C 822,616 814,681 798,735 781,788 760,832 733,866 706,900 676,925 642,941 607,957 572,965 536,965 490,965 451,957 418,941 385,925 357,900 336,866 314,831 298,787 288,734 277,680 272,616 272,541 272,463 277,398 288,345 298,292 314,249 335,216 356,183 383,160 416,146 449,132 488,125 533,125 569,125 604,133 639,148 673,163 704,188 731,221 758,254 780,297 797,350 814,403 822,466 822,541 Z"/>
<glyph unicode="f" horiz-adv-x="557" d="M 361,951 L 361,0 181,0 181,951 29,951 29,1082 181,1082 181,1204 C 181,1243 185,1280 192,1314 199,1347 213,1377 233,1402 252,1427 279,1446 313,1461 347,1475 391,1482 445,1482 466,1482 489,1481 512,1479 535,1477 555,1474 572,1470 L 572,1333 C 561,1335 548,1337 533,1339 518,1340 504,1341 492,1341 465,1341 444,1337 427,1330 410,1323 396,1312 387,1299 377,1285 370,1268 367,1248 363,1228 361,1205 361,1179 L 361,1082 572,1082 572,951 361,951 Z"/>
<glyph unicode="e" horiz-adv-x="980" d="M 276,503 C 276,446 282,394 294,347 305,299 323,258 348,224 372,189 403,163 441,144 479,125 525,115 578,115 656,115 719,131 766,162 813,193 844,233 861,281 L 1019,236 C 1008,206 992,176 972,146 951,115 924,88 890,64 856,39 814,19 763,4 712,-12 650,-20 578,-20 418,-20 296,28 213,123 129,218 87,360 87,548 87,649 100,735 125,806 150,876 185,933 229,977 273,1021 324,1053 383,1073 442,1092 504,1102 571,1102 662,1102 738,1087 799,1058 860,1029 909,988 946,937 983,885 1009,824 1025,754 1040,684 1048,608 1048,527 L 1048,503 276,503 Z M 862,641 C 852,755 823,838 775,891 727,943 658,969 568,969 538,969 507,964 474,955 441,945 410,928 382,903 354,878 330,845 311,803 292,760 281,706 278,641 L 862,641 Z"/>
<glyph unicode="d" horiz-adv-x="927" d="M 821,174 C 788,105 744,55 689,25 634,-5 565,-20 484,-20 347,-20 247,26 183,118 118,210 86,349 86,536 86,913 219,1102 484,1102 566,1102 634,1087 689,1057 744,1027 788,979 821,914 L 823,914 C 823,921 823,931 823,946 822,960 822,975 822,991 821,1006 821,1021 821,1035 821,1049 821,1059 821,1065 L 821,1484 1001,1484 1001,223 C 1001,197 1001,172 1002,148 1002,124 1002,102 1003,82 1004,62 1004,45 1005,31 1006,16 1006,6 1007,0 L 835,0 C 834,7 833,16 832,29 831,41 830,55 829,71 828,87 827,104 826,122 825,139 825,157 825,174 L 821,174 Z M 275,542 C 275,467 280,403 289,350 298,297 313,253 334,219 355,184 381,159 413,143 445,127 484,119 530,119 577,119 619,127 656,142 692,157 722,182 747,217 771,251 789,296 802,351 815,406 821,474 821,554 821,631 815,696 802,749 789,802 771,844 746,877 721,910 691,933 656,948 620,962 579,969 532,969 488,969 450,961 418,946 386,931 359,906 338,872 317,838 301,794 291,740 280,685 275,619 275,542 Z"/>
<glyph unicode="c" horiz-adv-x="901" d="M 275,546 C 275,484 280,427 289,375 298,323 313,278 334,241 355,203 384,174 419,153 454,132 497,122 548,122 612,122 666,139 709,174 752,209 778,262 788,334 L 970,322 C 964,277 951,234 931,193 911,152 884,115 850,84 815,53 773,28 724,9 675,-10 618,-20 553,-20 468,-20 396,-6 337,23 278,52 230,91 193,142 156,192 129,251 112,320 95,388 87,462 87,542 87,615 93,679 105,735 117,790 134,839 156,881 177,922 203,957 232,986 261,1014 293,1037 328,1054 362,1071 398,1083 436,1091 474,1098 512,1102 551,1102 612,1102 666,1094 713,1077 760,1060 801,1038 836,1009 870,980 898,945 919,906 940,867 955,824 964,779 L 779,765 C 770,825 746,873 708,908 670,943 616,961 546,961 495,961 452,953 418,936 383,919 355,893 334,859 313,824 298,781 289,729 280,677 275,616 275,546 Z"/>
<glyph unicode="b" horiz-adv-x="953" d="M 1053,546 C 1053,169 920,-20 655,-20 573,-20 505,-5 451,25 396,54 352,102 318,168 L 316,168 C 316,151 316,133 315,114 314,95 313,78 312,62 311,46 310,32 309,21 308,10 307,3 306,0 L 132,0 C 133,6 133,16 134,31 135,45 135,62 136,82 137,102 137,124 138,148 138,172 138,197 138,223 L 138,1484 318,1484 318,1061 C 318,1041 318,1022 318,1004 317,985 317,969 316,955 315,938 315,923 314,908 L 318,908 C 351,977 396,1027 451,1057 506,1087 574,1102 655,1102 792,1102 892,1056 957,964 1021,872 1053,733 1053,546 Z M 864,540 C 864,615 859,679 850,732 841,785 826,829 805,864 784,898 758,923 726,939 694,955 655,963 609,963 562,963 520,955 484,940 447,925 417,900 393,866 368,832 350,787 337,732 324,677 318,609 318,529 318,452 324,387 337,334 350,281 368,239 393,206 417,173 447,149 483,135 519,120 560,113 607,113 651,113 689,121 721,136 753,151 780,176 801,210 822,244 838,288 849,343 859,397 864,463 864,540 Z"/>
<glyph unicode="a" horiz-adv-x="1060" d="M 414,-20 C 305,-20 224,9 169,66 114,123 87,202 87,302 87,373 101,432 128,478 155,523 190,559 234,585 277,611 327,629 383,639 439,649 496,655 554,656 L 797,660 797,719 C 797,764 792,802 783,833 774,864 759,890 740,909 721,928 697,943 668,952 639,961 604,965 565,965 530,965 499,963 471,958 443,953 419,944 398,931 377,918 361,900 348,878 335,855 327,827 323,793 L 135,810 C 142,853 154,892 173,928 192,963 218,994 253,1020 287,1046 330,1066 382,1081 433,1095 496,1102 569,1102 705,1102 807,1071 876,1009 945,946 979,856 979,738 L 979,272 C 979,219 986,179 1000,152 1014,125 1041,111 1080,111 1090,111 1100,112 1110,113 1120,114 1130,116 1139,118 L 1139,6 C 1116,1 1094,-3 1072,-6 1049,-9 1025,-10 1000,-10 966,-10 937,-5 913,4 888,13 868,26 853,45 838,63 826,86 818,113 810,140 805,171 803,207 L 797,207 C 778,172 757,141 734,113 711,85 684,61 653,42 622,22 588,7 549,-4 510,-15 465,-20 414,-20 Z M 455,115 C 512,115 563,126 606,147 649,168 684,194 713,227 741,260 762,295 776,334 790,373 797,410 797,445 L 797,534 600,530 C 556,529 514,526 475,521 435,515 400,504 370,487 340,470 316,447 299,417 281,387 272,348 272,299 272,240 288,195 320,163 351,131 396,115 455,115 Z"/>
<glyph unicode="_" horiz-adv-x="1218" d="M -31,-407 L -31,-277 1162,-277 1162,-407 -31,-407 Z"/>
<glyph unicode="T" horiz-adv-x="1192" d="M 720,1253 L 720,0 530,0 530,1253 46,1253 46,1409 1204,1409 1204,1253 720,1253 Z"/>
<glyph unicode="S" horiz-adv-x="1192" d="M 1272,389 C 1272,330 1261,275 1238,225 1215,175 1179,132 1131,96 1083,59 1023,31 950,11 877,-10 790,-20 690,-20 515,-20 378,11 280,72 182,133 120,222 93,338 L 278,375 C 287,338 302,305 321,275 340,245 367,219 400,198 433,176 473,159 522,147 571,135 629,129 697,129 754,129 806,134 853,144 900,153 941,168 975,188 1009,208 1036,234 1055,266 1074,297 1083,335 1083,379 1083,425 1073,462 1052,491 1031,520 1001,543 963,562 925,581 880,596 827,609 774,622 716,635 652,650 613,659 573,668 534,679 494,689 456,701 420,716 383,730 349,747 317,766 285,785 257,809 234,836 211,863 192,894 179,930 166,965 159,1006 159,1053 159,1120 173,1177 200,1225 227,1272 264,1311 312,1342 360,1373 417,1395 482,1409 547,1423 618,1430 694,1430 781,1430 856,1423 918,1410 980,1396 1032,1375 1075,1348 1118,1321 1152,1287 1178,1247 1203,1206 1224,1159 1239,1106 L 1051,1073 C 1042,1107 1028,1137 1011,1164 993,1191 970,1213 941,1231 912,1249 878,1263 837,1272 796,1281 747,1286 692,1286 627,1286 572,1280 528,1269 483,1257 448,1241 421,1221 394,1201 374,1178 363,1151 351,1124 345,1094 345,1063 345,1021 356,987 377,960 398,933 426,910 462,892 498,874 540,859 587,847 634,835 685,823 738,811 781,801 825,791 868,781 911,770 952,758 991,744 1030,729 1067,712 1102,693 1136,674 1166,650 1191,622 1216,594 1236,561 1251,523 1265,485 1272,440 1272,389 Z"/>
<glyph unicode="L" horiz-adv-x="927" d="M 168,0 L 168,1409 359,1409 359,156 1071,156 1071,0 168,0 Z"/>
<glyph unicode="K" horiz-adv-x="1191" d="M 1106,0 L 543,680 359,540 359,0 168,0 168,1409 359,1409 359,703 1038,1409 1263,1409 663,797 1343,0 1106,0 Z"/>
<glyph unicode="1" horiz-adv-x="927" d="M 156,0 L 156,153 515,153 515,1237 197,1010 197,1180 530,1409 696,1409 696,153 1039,153 1039,0 156,0 Z"/>
<glyph unicode="." horiz-adv-x="213" d="M 187,0 L 187,219 382,219 382,0 187,0 Z"/>
<glyph unicode="," horiz-adv-x="239" d="M 385,219 L 385,51 C 385,16 384,-16 381,-46 378,-74 373,-101 366,-127 359,-151 351,-175 342,-197 332,-219 320,-241 307,-262 L 184,-262 C 214,-219 237,-175 254,-131 270,-87 278,-43 278,0 L 190,0 190,219 385,219 Z"/>
<glyph unicode=" " horiz-adv-x="556"/>
</font>
</defs>
<defs class="TextShapeIndex">
<g ooo:slide="id1" ooo:id-list="id3 id4 id5 id6 id7 id8 id9 id10 id11 id12 id13 id14 id15 id16 id17 id18 id19 id20 id21 id22 id23 id24 id25 id26 id27 id28 id29 id30 id31 id32 id33 id34 id35 id36 id37 id38 id39 id40 id41 id42 id43 id44 id45 id46 id47 id48 id49 id50 id51 id52 id53 id54 id55 id56 id57 id58 id59 id60 id61 id62 id63 id64 id65 id66 id67 id68 id69 id70 id71 id72 id73 id74 id75 id76 id77 id78 id79 id80 id81 id82 id83 id84 id85 id86 id87 id88 id89 id90 id91"/>
</defs>
<defs class="EmbeddedBulletChars">
<g id="bullet-char-template-57356" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"/>
</g>
<g id="bullet-char-template-57354" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z"/>
</g>
<g id="bullet-char-template-10146" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z"/>
</g>
<g id="bullet-char-template-10132" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z"/>
</g>
<g id="bullet-char-template-10007" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z"/>
</g>
<g id="bullet-char-template-10004" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z"/>
</g>
<g id="bullet-char-template-9679" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z"/>
</g>
<g id="bullet-char-template-8226" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z"/>
</g>
<g id="bullet-char-template-8211" transform="scale(0.00048828125,-0.00048828125)">
<path d="M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z"/>
</g>
<g id="bullet-char-template-61548" transform="scale(0.00048828125,-0.00048828125)">
<path d="M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z"/>
</g>
</defs>
<g>
<g id="id2" class="Master_Slide">
<g id="bg-id2" class="Background"/>
<g id="bo-id2" class="BackgroundObjects"/>
</g>
</g>
<g class="SlideGroup">
<g>
<g id="container-id1">
<g id="id1" class="Slide" clip-path="url(#presentation_clip_path)">
<g class="Page">
<g class="com.sun.star.drawing.CustomShape">
<g id="id3">
<rect class="BoundingBox" stroke="none" fill="none" x="6002" y="9031" width="4292" height="2261"/>
<path fill="rgb(114,159,207)" stroke="none" d="M 8148,11290 L 6003,11290 6003,9032 10292,9032 10292,11290 8148,11290 Z"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 8148,11290 L 6003,11290 6003,9032 10292,9032 10292,11290 8148,11290 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="716px" font-weight="400"><tspan class="TextPosition" x="7115" y="10409"><tspan fill="rgb(0,0,0)" stroke="none">Lehrer</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id4">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="4062" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,4628 C 4181,4727 4094,4825 3930,4911 3765,4996 3528,5068 3243,5117 2957,5167 2633,5193 2304,5193 1975,5193 1651,5167 1366,5117 1080,5068 843,4996 678,4911 514,4825 427,4727 427,4628 427,4529 514,4431 678,4346 843,4260 1080,4188 1365,4139 1651,4089 1975,4063 2304,4063 2633,4063 2957,4089 3242,4139 3528,4188 3765,4260 3930,4345 4094,4431 4181,4529 4181,4628 L 4181,4628 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,4628 C 4181,4727 4094,4825 3930,4911 3765,4996 3528,5068 3243,5117 2957,5167 2633,5193 2304,5193 1975,5193 1651,5167 1366,5117 1080,5068 843,4996 678,4911 514,4825 427,4727 427,4628 427,4529 514,4431 678,4346 843,4260 1080,4188 1365,4139 1651,4089 1975,4063 2304,4063 2633,4063 2957,4089 3242,4139 3528,4188 3765,4260 3930,4345 4094,4431 4181,4529 4181,4628 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="2139" y="4776"><tspan fill="rgb(0,0,0)" stroke="none">id</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id5">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="5304" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,5870 C 4181,5969 4094,6067 3930,6153 3765,6238 3528,6310 3243,6359 2957,6409 2633,6435 2304,6435 1975,6435 1651,6409 1366,6359 1080,6310 843,6238 678,6153 514,6067 427,5969 427,5870 427,5771 514,5673 678,5588 843,5502 1080,5430 1365,5381 1651,5331 1975,5305 2304,5305 2633,5305 2957,5331 3242,5381 3528,5430 3765,5502 3930,5587 4094,5673 4181,5771 4181,5870 L 4181,5870 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,5870 C 4181,5969 4094,6067 3930,6153 3765,6238 3528,6310 3243,6359 2957,6409 2633,6435 2304,6435 1975,6435 1651,6409 1366,6359 1080,6310 843,6238 678,6153 514,6067 427,5969 427,5870 427,5771 514,5673 678,5588 843,5502 1080,5430 1365,5381 1651,5331 1975,5305 2304,5305 2633,5305 2957,5331 3242,5381 3528,5430 3765,5502 3930,5587 4094,5673 4181,5771 4181,5870 L 4181,5870 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="1620" y="6018"><tspan fill="rgb(0,0,0)" stroke="none">kuerzel</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id6">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="6546" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,7112 C 4181,7211 4094,7309 3930,7395 3765,7480 3528,7552 3243,7601 2957,7651 2633,7677 2304,7677 1975,7677 1651,7651 1366,7601 1080,7552 843,7480 678,7395 514,7309 427,7211 427,7112 427,7013 514,6915 678,6830 843,6744 1080,6672 1365,6623 1651,6573 1975,6547 2304,6547 2633,6547 2957,6573 3242,6623 3528,6672 3765,6744 3930,6829 4094,6915 4181,7013 4181,7112 L 4181,7112 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,7112 C 4181,7211 4094,7309 3930,7395 3765,7480 3528,7552 3243,7601 2957,7651 2633,7677 2304,7677 1975,7677 1651,7651 1366,7601 1080,7552 843,7480 678,7395 514,7309 427,7211 427,7112 427,7013 514,6915 678,6830 843,6744 1080,6672 1365,6623 1651,6573 1975,6547 2304,6547 2633,6547 2957,6573 3242,6623 3528,6672 3765,6744 3930,6829 4094,6915 4181,7013 4181,7112 L 4181,7112 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="1798" y="7260"><tspan fill="rgb(0,0,0)" stroke="none">email</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id7">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="7788" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,8354 C 4181,8453 4094,8551 3930,8637 3765,8722 3528,8794 3243,8843 2957,8893 2633,8919 2304,8919 1975,8919 1651,8893 1366,8843 1080,8794 843,8722 678,8637 514,8551 427,8453 427,8354 427,8255 514,8157 678,8072 843,7986 1080,7914 1365,7865 1651,7815 1975,7789 2304,7789 2633,7789 2957,7815 3242,7865 3528,7914 3765,7986 3930,8071 4094,8157 4181,8255 4181,8354 L 4181,8354 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,8354 C 4181,8453 4094,8551 3930,8637 3765,8722 3528,8794 3243,8843 2957,8893 2633,8919 2304,8919 1975,8919 1651,8893 1366,8843 1080,8794 843,8722 678,8637 514,8551 427,8453 427,8354 427,8255 514,8157 678,8072 843,7986 1080,7914 1365,7865 1651,7815 1975,7789 2304,7789 2633,7789 2957,7815 3242,7865 3528,7914 3765,7986 3930,8071 4094,8157 4181,8255 4181,8354 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="1101" y="8502"><tspan fill="rgb(0,0,0)" stroke="none">is_confirmed</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id8">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="9030" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,9596 C 4181,9695 4094,9793 3930,9879 3765,9964 3528,10036 3243,10085 2957,10135 2633,10161 2304,10161 1975,10161 1651,10135 1366,10085 1080,10036 843,9964 678,9879 514,9793 427,9695 427,9596 427,9497 514,9399 678,9314 843,9228 1080,9156 1365,9107 1651,9057 1975,9031 2304,9031 2633,9031 2957,9057 3242,9107 3528,9156 3765,9228 3930,9314 4094,9399 4181,9497 4181,9596 L 4181,9596 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,9596 C 4181,9695 4094,9793 3930,9879 3765,9964 3528,10036 3243,10085 2957,10135 2633,10161 2304,10161 1975,10161 1651,10135 1366,10085 1080,10036 843,9964 678,9879 514,9793 427,9695 427,9596 427,9497 514,9399 678,9314 843,9228 1080,9156 1365,9107 1651,9057 1975,9031 2304,9031 2633,9031 2957,9057 3242,9107 3528,9156 3765,9228 3930,9314 4094,9399 4181,9497 4181,9596 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="1334" y="9744"><tspan fill="rgb(0,0,0)" stroke="none">pwd_hash</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id9">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="10272" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,10838 C 4181,10937 4094,11035 3930,11121 3765,11206 3528,11278 3243,11327 2957,11377 2633,11403 2304,11403 1975,11403 1651,11377 1366,11327 1080,11278 843,11206 678,11121 514,11035 427,10937 427,10838 427,10739 514,10641 678,10556 843,10470 1080,10398 1365,10349 1651,10299 1975,10273 2304,10273 2633,10273 2957,10299 3242,10349 3528,10398 3765,10470 3930,10556 4094,10641 4181,10739 4181,10838 L 4181,10838 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,10838 C 4181,10937 4094,11035 3930,11121 3765,11206 3528,11278 3243,11327 2957,11377 2633,11403 2304,11403 1975,11403 1651,11377 1366,11327 1080,11278 843,11206 678,11121 514,11035 427,10937 427,10838 427,10739 514,10641 678,10556 843,10470 1080,10398 1365,10349 1651,10299 1975,10273 2304,10273 2633,10273 2957,10299 3242,10349 3528,10398 3765,10470 3930,10556 4094,10641 4181,10739 4181,10838 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="1455" y="10986"><tspan fill="rgb(0,0,0)" stroke="none">is_admin</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id10">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="4628" width="1826" height="5535"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,4629 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id11">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="5870" width="1826" height="4293"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,5871 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id12">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="7112" width="1826" height="3051"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,7113 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id13">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="8354" width="1826" height="1809"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,8355 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id14">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="9596" width="1826" height="567"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,9597 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id15">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="10160" width="1826" height="681"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,10839 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id16">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="11514" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,12080 C 4181,12179 4094,12277 3930,12363 3765,12448 3528,12520 3243,12569 2957,12619 2633,12645 2304,12645 1975,12645 1651,12619 1366,12569 1080,12520 843,12448 678,12363 514,12277 427,12179 427,12080 427,11981 514,11883 678,11798 843,11712 1080,11640 1365,11591 1651,11541 1975,11515 2304,11515 2633,11515 2957,11541 3242,11591 3528,11640 3765,11712 3930,11798 4094,11883 4181,11981 4181,12080 L 4181,12080 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,12080 C 4181,12179 4094,12277 3930,12363 3765,12448 3528,12520 3243,12569 2957,12619 2633,12645 2304,12645 1975,12645 1651,12619 1366,12569 1080,12520 843,12448 678,12363 514,12277 427,12179 427,12080 427,11981 514,11883 678,11798 843,11712 1080,11640 1365,11591 1651,11541 1975,11515 2304,11515 2633,11515 2957,11541 3242,11591 3528,11640 3765,11712 3930,11798 4094,11883 4181,11981 4181,12080 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="978" y="12228"><tspan fill="rgb(0,0,0)" stroke="none">pwd_changed</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id17">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="12755" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,13321 C 4181,13420 4094,13518 3930,13604 3765,13689 3528,13761 3243,13810 2957,13860 2633,13886 2304,13886 1975,13886 1651,13860 1366,13810 1080,13761 843,13689 678,13604 514,13518 427,13420 427,13321 427,13222 514,13124 678,13039 843,12953 1080,12881 1365,12832 1651,12782 1975,12756 2304,12756 2633,12756 2957,12782 3242,12832 3528,12881 3765,12953 3930,13039 4094,13124 4181,13222 4181,13321 L 4181,13321 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,13321 C 4181,13420 4094,13518 3930,13604 3765,13689 3528,13761 3243,13810 2957,13860 2633,13886 2304,13886 1975,13886 1651,13860 1366,13810 1080,13761 843,13689 678,13604 514,13518 427,13420 427,13321 427,13222 514,13124 678,13039 843,12953 1080,12881 1365,12832 1651,12782 1975,12756 2304,12756 2633,12756 2957,12782 3242,12832 3528,12881 3765,12953 3930,13039 4094,13124 4181,13222 4181,13321 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400"><tspan class="TextPosition" x="1105" y="13420"><tspan fill="rgb(0,0,0)" stroke="none">confirmation_token</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id18">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="13997" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,14563 C 4181,14662 4094,14760 3930,14846 3765,14931 3528,15003 3243,15052 2957,15102 2633,15128 2304,15128 1975,15128 1651,15102 1366,15052 1080,15003 843,14931 678,14846 514,14760 427,14662 427,14563 427,14464 514,14366 678,14281 843,14195 1080,14123 1365,14074 1651,14024 1975,13998 2304,13998 2633,13998 2957,14024 3242,14074 3528,14123 3765,14195 3930,14281 4094,14366 4181,14464 4181,14563 L 4181,14563 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,14563 C 4181,14662 4094,14760 3930,14846 3765,14931 3528,15003 3243,15052 2957,15102 2633,15128 2304,15128 1975,15128 1651,15102 1366,15052 1080,15003 843,14931 678,14846 514,14760 427,14662 427,14563 427,14464 514,14366 678,14281 843,14195 1080,14123 1365,14074 1651,14024 1975,13998 2304,13998 2633,13998 2957,14024 3242,14074 3528,14123 3765,14195 3930,14281 4094,14366 4181,14464 4181,14563 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400"><tspan class="TextPosition" x="879" y="14662"><tspan fill="rgb(0,0,0)" stroke="none">password_reset_token</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id19">
<rect class="BoundingBox" stroke="none" fill="none" x="426" y="15239" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 4181,15805 C 4181,15904 4094,16002 3930,16088 3765,16173 3528,16245 3243,16294 2957,16344 2633,16370 2304,16370 1975,16370 1651,16344 1366,16294 1080,16245 843,16173 678,16088 514,16002 427,15904 427,15805 427,15706 514,15608 678,15523 843,15437 1080,15365 1365,15316 1651,15266 1975,15240 2304,15240 2633,15240 2957,15266 3242,15316 3528,15365 3765,15437 3930,15523 4094,15608 4181,15706 4181,15805 L 4181,15805 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,15805 C 4181,15904 4094,16002 3930,16088 3765,16173 3528,16245 3243,16294 2957,16344 2633,16370 2304,16370 1975,16370 1651,16344 1366,16294 1080,16245 843,16173 678,16088 514,16002 427,15904 427,15805 427,15706 514,15608 678,15523 843,15437 1080,15365 1365,15316 1651,15266 1975,15240 2304,15240 2633,15240 2957,15266 3242,15316 3528,15365 3765,15437 3930,15523 4094,15608 4181,15706 4181,15805 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400"><tspan class="TextPosition" x="847" y="15904"><tspan fill="rgb(0,0,0)" stroke="none">password_reset_expiry</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id20">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="10160" width="1826" height="1923"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,12081 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id21">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="10160" width="1826" height="3164"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,13322 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id22">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="10160" width="1826" height="4406"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,14564 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id23">
<rect class="BoundingBox" stroke="none" fill="none" x="4180" y="10160" width="1826" height="5648"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 4181,15806 L 6004,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id24">
<rect class="BoundingBox" stroke="none" fill="none" x="19619" y="9031" width="4292" height="2261"/>
<path fill="rgb(114,159,207)" stroke="none" d="M 21765,11290 L 19620,11290 19620,9032 23909,9032 23909,11290 21765,11290 Z"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 21765,11290 L 19620,11290 19620,9032 23909,9032 23909,11290 21765,11290 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="716px" font-weight="400"><tspan class="TextPosition" x="20550" y="10409"><tspan fill="rgb(0,0,0)" stroke="none">Klausur</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id25">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="5868" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,6434 C 29271,6533 29184,6631 29020,6717 28855,6802 28618,6874 28332,6923 28047,6973 27723,6999 27394,6999 27065,6999 26741,6973 26455,6923 26170,6874 25933,6802 25768,6717 25604,6631 25517,6533 25517,6434 25517,6335 25604,6237 25768,6152 25933,6066 26170,5994 26455,5945 26741,5895 27065,5869 27394,5869 27723,5869 28047,5895 28332,5945 28618,5994 28855,6066 29020,6151 29184,6237 29271,6335 29271,6434 L 29271,6434 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,6434 C 29271,6533 29184,6631 29020,6717 28855,6802 28618,6874 28332,6923 28047,6973 27723,6999 27394,6999 27065,6999 26741,6973 26455,6923 26170,6874 25933,6802 25768,6717 25604,6631 25517,6533 25517,6434 25517,6335 25604,6237 25768,6152 25933,6066 26170,5994 26455,5945 26741,5895 27065,5869 27394,5869 27723,5869 28047,5895 28332,5945 28618,5994 28855,6066 29020,6151 29184,6237 29271,6335 29271,6434 L 29271,6434 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="27229" y="6582"><tspan fill="rgb(0,0,0)" stroke="none">id</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id26">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="7110" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,7676 C 29271,7775 29184,7873 29020,7959 28855,8044 28618,8116 28332,8165 28047,8215 27723,8241 27394,8241 27065,8241 26741,8215 26455,8165 26170,8116 25933,8044 25768,7959 25604,7873 25517,7775 25517,7676 25517,7577 25604,7479 25768,7394 25933,7308 26170,7236 26455,7187 26741,7137 27065,7111 27394,7111 27723,7111 28047,7137 28332,7187 28618,7236 28855,7308 29020,7393 29184,7479 29271,7577 29271,7676 L 29271,7676 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,7676 C 29271,7775 29184,7873 29020,7959 28855,8044 28618,8116 28332,8165 28047,8215 27723,8241 27394,8241 27065,8241 26741,8215 26455,8165 26170,8116 25933,8044 25768,7959 25604,7873 25517,7775 25517,7676 25517,7577 25604,7479 25768,7394 25933,7308 26170,7236 26455,7187 26741,7137 27065,7111 27394,7111 27723,7111 28047,7137 28332,7187 28618,7236 28855,7308 29020,7393 29184,7479 29271,7577 29271,7676 L 29271,7676 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26462" y="7824"><tspan fill="rgb(0,0,0)" stroke="none">kursname</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id27">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="8352" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,8918 C 29271,9017 29184,9115 29020,9201 28855,9286 28618,9358 28332,9407 28047,9457 27723,9483 27394,9483 27065,9483 26741,9457 26455,9407 26170,9358 25933,9286 25768,9201 25604,9115 25517,9017 25517,8918 25517,8819 25604,8721 25768,8636 25933,8550 26170,8478 26455,8429 26741,8379 27065,8353 27394,8353 27723,8353 28047,8379 28332,8429 28618,8478 28855,8550 29020,8636 29184,8721 29271,8819 29271,8918 L 29271,8918 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,8918 C 29271,9017 29184,9115 29020,9201 28855,9286 28618,9358 28332,9407 28047,9457 27723,9483 27394,9483 27065,9483 26741,9457 26455,9407 26170,9358 25933,9286 25768,9201 25604,9115 25517,9017 25517,8918 25517,8819 25604,8721 25768,8636 25933,8550 26170,8478 26455,8429 26741,8379 27065,8353 27394,8353 27723,8353 28047,8379 28332,8429 28618,8478 28855,8550 29020,8636 29184,8721 29271,8819 29271,8918 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26755" y="9066"><tspan fill="rgb(0,0,0)" stroke="none">laenge</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id28">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="9594" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,10160 C 29271,10259 29184,10357 29020,10443 28855,10528 28618,10600 28332,10649 28047,10699 27723,10725 27394,10725 27065,10725 26741,10699 26455,10649 26170,10600 25933,10528 25768,10443 25604,10357 25517,10259 25517,10160 25517,10061 25604,9963 25768,9878 25933,9792 26170,9720 26455,9671 26741,9621 27065,9595 27394,9595 27723,9595 28047,9621 28332,9671 28618,9720 28855,9792 29020,9878 29184,9963 29271,10061 29271,10160 L 29271,10160 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,10160 C 29271,10259 29184,10357 29020,10443 28855,10528 28618,10600 28332,10649 28047,10699 27723,10725 27394,10725 27065,10725 26741,10699 26455,10649 26170,10600 25933,10528 25768,10443 25604,10357 25517,10259 25517,10160 25517,10061 25604,9963 25768,9878 25933,9792 26170,9720 26455,9671 26741,9621 27065,9595 27394,9595 27723,9595 28047,9621 28332,9671 28618,9720 28855,9792 29020,9878 29184,9963 29271,10061 29271,10160 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26814" y="10308"><tspan fill="rgb(0,0,0)" stroke="none">edited</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id29">
<rect class="BoundingBox" stroke="none" fill="none" x="12864" y="13885" width="4292" height="2261"/>
<path fill="rgb(114,159,207)" stroke="none" d="M 15010,16144 L 12865,16144 12865,13886 17154,13886 17154,16144 15010,16144 Z"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 15010,16144 L 12865,16144 12865,13886 17154,13886 17154,16144 15010,16144 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="716px" font-weight="400"><tspan class="TextPosition" x="14174" y="15263"><tspan fill="rgb(0,0,0)" stroke="none">Stufe</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id30">
<rect class="BoundingBox" stroke="none" fill="none" x="6002" y="13884" width="4293" height="2273"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 8148,13885 L 10293,15020 8148,16155 6003,15020 8148,13885 8148,13885 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 8148,13885 L 10293,15020 8148,16155 6003,15020 8148,13885 8148,13885 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="7582" y="15032"><tspan fill="rgb(0,0,0)" stroke="none">berät</tspan></tspan></tspan><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400"><tspan class="TextPosition" x="6875" y="15396"><tspan fill="rgb(0,0,0)" stroke="none">Lehrer.beraet_name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id31">
<rect class="BoundingBox" stroke="none" fill="none" x="10292" y="15014" width="2576" height="9"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 10293,15021 L 11579,15021 11579,15015 12866,15015"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id32">
<rect class="BoundingBox" stroke="none" fill="none" x="8147" y="11289" width="4" height="2599"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 8149,13886 L 8149,12588 8148,12588 8148,11290"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id33">
<rect class="BoundingBox" stroke="none" fill="none" x="19619" y="13884" width="4293" height="2273"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 21765,13885 L 23910,15020 21765,16155 19620,15020 21765,13885 21765,13885 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 21765,13885 L 23910,15020 21765,16155 19620,15020 21765,13885 21765,13885 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="20729" y="14873"><tspan fill="rgb(0,0,0)" stroke="none">gehört zu</tspan></tspan><tspan class="TextPosition" x="20509" y="15237"><tspan font-size="282px" fill="rgb(0,0,0)" stroke="none">Klausur.stufe_name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id34">
<rect class="BoundingBox" stroke="none" fill="none" x="17154" y="15014" width="2469" height="9"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 17155,15015 L 18387,15015 18387,15021 19621,15021"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id35">
<rect class="BoundingBox" stroke="none" fill="none" x="14687" y="9030" width="4293" height="2273"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 16833,9031 L 18978,10166 16833,11301 14688,10166 16833,9031 16833,9031 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 16833,9031 L 18978,10166 16833,11301 14688,10166 16833,9031 16833,9031 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="15537" y="10178"><tspan fill="rgb(0,0,0)" stroke="none">wird betreut</tspan></tspan><tspan class="TextPosition" x="15770" y="10542"><tspan font-size="282px" fill="rgb(0,0,0)" stroke="none">Klausur.lehrer_id</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id36">
<rect class="BoundingBox" stroke="none" fill="none" x="10292" y="10160" width="4399" height="9"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 14689,10167 L 12490,10167 12490,10161 10293,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id37">
<rect class="BoundingBox" stroke="none" fill="none" x="18977" y="10160" width="646" height="9"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 18978,10167 L 19299,10167 19299,10161 19621,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id38">
<rect class="BoundingBox" stroke="none" fill="none" x="21764" y="11289" width="4" height="2599"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 21766,13886 L 21766,12588 21765,12588 21765,11290"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id39">
<rect class="BoundingBox" stroke="none" fill="none" x="12864" y="4627" width="4292" height="2261"/>
<path fill="rgb(114,159,207)" stroke="none" d="M 15010,6886 L 12865,6886 12865,4628 17154,4628 17154,6886 15010,6886 Z"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 15010,6886 L 12865,6886 12865,4628 17154,4628 17154,6886 15010,6886 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="716px" font-weight="400"><tspan class="TextPosition" x="13596" y="6005"><tspan fill="rgb(0,0,0)" stroke="none">Schueler</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id40">
<rect class="BoundingBox" stroke="none" fill="none" x="19619" y="4062" width="4293" height="3391"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 21765,4063 L 23910,5757 21765,7451 19620,5757 21765,4063 21765,4063 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 21765,4063 L 23910,5757 21765,7451 19620,5757 21765,4063 21765,4063 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="20655" y="5452"><tspan fill="rgb(0,0,0)" stroke="none">nimmt Teil</tspan></tspan><tspan class="TextPosition" x="20670" y="5816"><tspan font-size="282px" fill="rgb(0,0,0)" stroke="none">Klausurteilnahme</tspan></tspan></tspan><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="20960" y="6134"><tspan text-decoration="none" fill="rgb(0,0,0)" stroke="none">.</tspan><tspan fill="rgb(0,0,0)" stroke="none">schueler_id</tspan><tspan text-decoration="none" fill="rgb(0,0,0)" stroke="none">,</tspan></tspan></tspan><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="21079" y="6452"><tspan text-decoration="none" fill="rgb(0,0,0)" stroke="none">.</tspan><tspan fill="rgb(0,0,0)" stroke="none">klausur_id</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id41">
<rect class="BoundingBox" stroke="none" fill="none" x="17154" y="5756" width="2469" height="4"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 19621,5758 L 18387,5758 18387,5757 17155,5757"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id42">
<rect class="BoundingBox" stroke="none" fill="none" x="21764" y="7450" width="4" height="1584"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 21766,7451 L 21766,8242 21765,8242 21765,9032"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id43">
<rect class="BoundingBox" stroke="none" fill="none" x="19512" y="110" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 23267,676 C 23267,775 23180,873 23016,959 22851,1044 22614,1116 22329,1165 22043,1215 21719,1241 21390,1241 21061,1241 20737,1215 20452,1165 20166,1116 19929,1044 19764,959 19600,873 19513,775 19513,676 19513,577 19600,479 19764,394 19929,308 20166,236 20452,187 20737,137 21061,111 21390,111 21719,111 22043,137 22329,187 22614,236 22851,308 23016,393 23180,479 23267,577 23267,676 L 23267,676 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23267,676 C 23267,775 23180,873 23016,959 22851,1044 22614,1116 22329,1165 22043,1215 21719,1241 21390,1241 21061,1241 20737,1215 20452,1165 20166,1116 19929,1044 19764,959 19600,873 19513,775 19513,676 19513,577 19600,479 19764,394 19929,308 20166,236 20452,187 20737,137 21061,111 21390,111 21719,111 22043,137 22329,187 22614,236 22851,308 23016,393 23180,479 23267,577 23267,676 L 23267,676 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="20399" y="824"><tspan fill="rgb(0,0,0)" stroke="none">versaeumt</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id44">
<rect class="BoundingBox" stroke="none" fill="none" x="20691" y="1352" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 24446,1918 C 24446,2017 24359,2115 24195,2201 24030,2286 23793,2358 23508,2407 23222,2457 22898,2483 22569,2483 22240,2483 21916,2457 21631,2407 21345,2358 21108,2286 20943,2201 20779,2115 20692,2017 20692,1918 20692,1819 20779,1721 20943,1636 21108,1550 21345,1478 21631,1429 21916,1379 22240,1353 22569,1353 22898,1353 23222,1379 23508,1429 23793,1478 24030,1550 24195,1635 24359,1721 24446,1819 24446,1918 L 24446,1918 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 24446,1918 C 24446,2017 24359,2115 24195,2201 24030,2286 23793,2358 23508,2407 23222,2457 22898,2483 22569,2483 22240,2483 21916,2457 21631,2407 21345,2358 21108,2286 20943,2201 20779,2115 20692,2017 20692,1918 20692,1819 20779,1721 20943,1636 21108,1550 21345,1478 21631,1429 21916,1379 22240,1353 22569,1353 22898,1353 23222,1379 23508,1429 23793,1478 24030,1550 24195,1635 24359,1721 24446,1819 24446,1918 L 24446,1918 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="21754" y="2066"><tspan fill="rgb(0,0,0)" stroke="none">attestiert</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id45">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="6434" width="1611" height="3729"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,6435"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id46">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="7676" width="1611" height="2487"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,7677"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id47">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="8918" width="1611" height="1245"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,8919"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id48">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="10160" width="1611" height="3"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,10161"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id49">
<rect class="BoundingBox" stroke="none" fill="none" x="11363" y="10723" width="4293" height="2273"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 13509,10724 L 15654,11859 13509,12994 11364,11859 13509,10724 13509,10724 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 13509,10724 L 15654,11859 13509,12994 11364,11859 13509,10724 13509,10724 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="12997" y="11712"><tspan fill="rgb(0,0,0)" stroke="none">ist in</tspan></tspan><tspan class="TextPosition" x="12175" y="12076"><tspan font-size="282px" fill="rgb(0,0,0)" stroke="none">Schueler.stufe_name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id50">
<rect class="BoundingBox" stroke="none" fill="none" x="13509" y="6885" width="1503" height="3842"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 15010,6886 L 15010,8805 13510,8805 13510,10725"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id51">
<rect class="BoundingBox" stroke="none" fill="none" x="13509" y="12993" width="1503" height="895"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 13510,12994 L 13510,13440 15010,13440 15010,13886"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id52">
<rect class="BoundingBox" stroke="none" fill="none" x="12649" y="110" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 16404,676 C 16404,775 16317,873 16153,959 15988,1044 15751,1116 15465,1165 15180,1215 14856,1241 14527,1241 14198,1241 13874,1215 13589,1165 13303,1116 13066,1044 12901,959 12737,873 12650,775 12650,676 12650,577 12737,479 12901,394 13066,308 13303,236 13588,187 13874,137 14198,111 14527,111 14856,111 15180,137 15465,187 15751,236 15988,308 16153,393 16317,479 16404,577 16404,676 L 16404,676 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 16404,676 C 16404,775 16317,873 16153,959 15988,1044 15751,1116 15465,1165 15180,1215 14856,1241 14527,1241 14198,1241 13874,1215 13589,1165 13303,1116 13066,1044 12901,959 12737,873 12650,775 12650,676 12650,577 12737,479 12901,394 13066,308 13303,236 13588,187 13874,137 14198,111 14527,111 14856,111 15180,137 15465,187 15751,236 15988,308 16153,393 16317,479 16404,577 16404,676 L 16404,676 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="14362" y="824"><tspan fill="rgb(0,0,0)" stroke="none">id</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id53">
<rect class="BoundingBox" stroke="none" fill="none" x="15008" y="2594" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 18763,3160 C 18763,3259 18676,3357 18512,3443 18347,3528 18110,3600 17825,3649 17539,3699 17215,3725 16886,3725 16557,3725 16233,3699 15947,3649 15662,3600 15425,3528 15260,3443 15096,3357 15009,3259 15009,3160 15009,3061 15096,2963 15260,2878 15425,2792 15662,2720 15947,2671 16233,2621 16557,2595 16886,2595 17215,2595 17539,2621 17825,2671 18110,2720 18347,2792 18512,2877 18676,2963 18763,3061 18763,3160 L 18763,3160 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 18763,3160 C 18763,3259 18676,3357 18512,3443 18347,3528 18110,3600 17825,3649 17539,3699 17215,3725 16886,3725 16557,3725 16233,3699 15947,3649 15662,3600 15425,3528 15260,3443 15096,3357 15009,3259 15009,3160 15009,3061 15096,2963 15260,2878 15425,2792 15662,2720 15947,2671 16233,2621 16557,2595 16886,2595 17215,2595 17539,2621 17825,2671 18110,2720 18347,2792 18512,2877 18676,2963 18763,3061 18763,3160 L 18763,3160 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="16060" y="3308"><tspan fill="rgb(0,0,0)" stroke="none">vorname</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id54">
<rect class="BoundingBox" stroke="none" fill="none" x="13829" y="1352" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 17584,1918 C 17584,2017 17497,2115 17333,2201 17168,2286 16931,2358 16646,2407 16360,2457 16036,2483 15707,2483 15378,2483 15054,2457 14769,2407 14483,2358 14246,2286 14081,2201 13917,2115 13830,2017 13830,1918 13830,1819 13917,1721 14081,1636 14246,1550 14483,1478 14768,1429 15054,1379 15378,1353 15707,1353 16036,1353 16360,1379 16646,1429 16931,1478 17168,1550 17333,1635 17497,1721 17584,1819 17584,1918 L 17584,1918 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 17584,1918 C 17584,2017 17497,2115 17333,2201 17168,2286 16931,2358 16646,2407 16360,2457 16036,2483 15707,2483 15378,2483 15054,2457 14769,2407 14483,2358 14246,2286 14081,2201 13917,2115 13830,2017 13830,1918 13830,1819 13917,1721 14081,1636 14246,1550 14483,1478 14768,1429 15054,1379 15378,1353 15707,1353 16036,1353 16360,1379 16646,1429 16931,1478 17168,1550 17333,1635 17497,1721 17584,1819 17584,1918 L 17584,1918 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="14714" y="2066"><tspan fill="rgb(0,0,0)" stroke="none">nachname</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id55">
<rect class="BoundingBox" stroke="none" fill="none" x="6216" y="902" width="4292" height="2261"/>
<path fill="rgb(114,159,207)" stroke="none" d="M 8362,3161 L 6217,3161 6217,903 10506,903 10506,3161 8362,3161 Z"/>
<path fill="none" stroke="rgb(52,101,164)" d="M 8362,3161 L 6217,3161 6217,903 10506,903 10506,3161 8362,3161 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="716px" font-weight="400"><tspan class="TextPosition" x="6488" y="2280"><tspan fill="rgb(0,0,0)" stroke="none">Koopschule</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id56">
<rect class="BoundingBox" stroke="none" fill="none" x="6216" y="4626" width="4293" height="2273"/>
<path fill="rgb(234,117,0)" stroke="none" d="M 8362,4627 L 10507,5762 8362,6897 6217,5762 8362,4627 8362,4627 Z"/>
<path fill="none" stroke="rgb(75,34,4)" d="M 8362,4627 L 10507,5762 8362,6897 6217,5762 8362,4627 8362,4627 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="494px" font-weight="400"><tspan class="TextPosition" x="7849" y="5456"><tspan fill="rgb(0,0,0)" stroke="none">ist in</tspan></tspan><tspan class="TextPosition" x="7802" y="5820"><tspan font-size="282px" fill="rgb(0,0,0)" stroke="none">Schueler</tspan></tspan></tspan><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="282px" font-weight="400"><tspan class="TextPosition" x="7051" y="6138"><tspan fill="rgb(0,0,0)" stroke="none">.stammschule_name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id57">
<rect class="BoundingBox" stroke="none" fill="none" x="10506" y="5756" width="2362" height="9"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 10507,5763 L 11686,5763 11686,5757 12866,5757"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id58">
<rect class="BoundingBox" stroke="none" fill="none" x="8361" y="3160" width="4" height="1470"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 8363,4628 L 8363,3894 8362,3894 8362,3161"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id59">
<rect class="BoundingBox" stroke="none" fill="none" x="1606" y="788" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 5361,1354 C 5361,1453 5274,1551 5110,1637 4945,1722 4708,1794 4423,1843 4137,1893 3813,1919 3484,1919 3155,1919 2831,1893 2546,1843 2260,1794 2023,1722 1858,1637 1694,1551 1607,1453 1607,1354 1607,1255 1694,1157 1858,1072 2023,986 2260,914 2545,865 2831,815 3155,789 3484,789 3813,789 4137,815 4422,865 4708,914 4945,986 5110,1071 5274,1157 5361,1255 5361,1354 L 5361,1354 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 5361,1354 C 5361,1453 5274,1551 5110,1637 4945,1722 4708,1794 4423,1843 4137,1893 3813,1919 3484,1919 3155,1919 2831,1893 2546,1843 2260,1794 2023,1722 1858,1637 1694,1551 1607,1453 1607,1354 1607,1255 1694,1157 1858,1072 2023,986 2260,914 2545,865 2831,815 3155,789 3484,789 3813,789 4137,815 4422,865 4708,914 4945,986 5110,1071 5274,1157 5361,1255 5361,1354 L 5361,1354 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="2800" y="1502"><tspan fill="rgb(0,0,0)" stroke="none">kuerzel</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id60">
<rect class="BoundingBox" stroke="none" fill="none" x="1606" y="2030" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 5361,2596 C 5361,2695 5274,2793 5110,2879 4945,2964 4708,3036 4423,3085 4137,3135 3813,3161 3484,3161 3155,3161 2831,3135 2546,3085 2260,3036 2023,2964 1858,2879 1694,2793 1607,2695 1607,2596 1607,2497 1694,2399 1858,2314 2023,2228 2260,2156 2545,2107 2831,2057 3155,2031 3484,2031 3813,2031 4137,2057 4422,2107 4708,2156 4945,2228 5110,2313 5274,2399 5361,2497 5361,2596 L 5361,2596 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 5361,2596 C 5361,2695 5274,2793 5110,2879 4945,2964 4708,3036 4423,3085 4137,3135 3813,3161 3484,3161 3155,3161 2831,3135 2546,3085 2260,3036 2023,2964 1858,2879 1694,2793 1607,2695 1607,2596 1607,2497 1694,2399 1858,2314 2023,2228 2260,2156 2545,2107 2831,2057 3155,2031 3484,2031 3813,2031 4137,2057 4422,2107 4708,2156 4945,2228 5110,2313 5274,2399 5361,2497 5361,2596 L 5361,2596 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="2952" y="2744"><tspan fill="rgb(0,0,0)" stroke="none">name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id61">
<rect class="BoundingBox" stroke="none" fill="none" x="5360" y="1354" width="860" height="680"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 5361,1355 L 6218,2032"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id62">
<rect class="BoundingBox" stroke="none" fill="none" x="5360" y="2031" width="860" height="568"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 5361,2597 L 6218,2032"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id63">
<rect class="BoundingBox" stroke="none" fill="none" x="15009" y="3559" width="552" height="1071"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 15010,4628 L 15559,3560"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id64">
<rect class="BoundingBox" stroke="none" fill="none" x="14379" y="2317" width="633" height="2313"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 15010,4628 L 14380,2318"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id65">
<rect class="BoundingBox" stroke="none" fill="none" x="13199" y="1075" width="1813" height="3555"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 15010,4628 L 13200,1076"/>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id66">
<rect class="BoundingBox" stroke="none" fill="none" x="8259" y="3048" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="8509" y="3491"><tspan fill="rgb(0,0,0)" stroke="none">1</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id67">
<rect class="BoundingBox" stroke="none" fill="none" x="12223" y="5142" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="12473" y="5585"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id68">
<rect class="BoundingBox" stroke="none" fill="none" x="12223" y="14400" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="12473" y="14843"><tspan fill="rgb(0,0,0)" stroke="none">1</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id69">
<rect class="BoundingBox" stroke="none" fill="none" x="8044" y="11177" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="8294" y="11620"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id70">
<rect class="BoundingBox" stroke="none" fill="none" x="14906" y="13271" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="15156" y="13714"><tspan fill="rgb(0,0,0)" stroke="none">1</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id71">
<rect class="BoundingBox" stroke="none" fill="none" x="14906" y="6774" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="15156" y="7217"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id72">
<rect class="BoundingBox" stroke="none" fill="none" x="18977" y="9545" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="19227" y="9988"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id73">
<rect class="BoundingBox" stroke="none" fill="none" x="10185" y="9545" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="10435" y="9988"><tspan fill="rgb(0,0,0)" stroke="none">1</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id74">
<rect class="BoundingBox" stroke="none" fill="none" x="17048" y="5142" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="17298" y="5585"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id75">
<rect class="BoundingBox" stroke="none" fill="none" x="21661" y="8416" width="852" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="21911" y="8859"><tspan fill="rgb(0,0,0)" stroke="none">m</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id76">
<rect class="BoundingBox" stroke="none" fill="none" x="21122" y="11177" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="21372" y="11620"><tspan fill="rgb(0,0,0)" stroke="none">n</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.TextShape">
<g id="id77">
<rect class="BoundingBox" stroke="none" fill="none" x="17051" y="14400" width="748" height="729"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="353px" font-weight="400"><tspan class="TextPosition" x="17301" y="14843"><tspan fill="rgb(0,0,0)" stroke="none">1</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id78">
<rect class="BoundingBox" stroke="none" fill="none" x="10612" y="16255" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 14367,16821 C 14367,16920 14280,17018 14116,17103 13951,17189 13714,17261 13429,17310 13143,17360 12819,17386 12490,17386 12161,17386 11837,17360 11552,17310 11266,17261 11029,17189 10864,17103 10700,17018 10613,16920 10613,16821 10613,16722 10700,16624 10864,16538 11029,16453 11266,16381 11551,16332 11837,16282 12161,16256 12490,16256 12819,16256 13143,16282 13429,16332 13714,16381 13951,16453 14116,16538 14280,16624 14367,16722 14367,16821 L 14367,16821 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 14367,16821 C 14367,16920 14280,17018 14116,17103 13951,17189 13714,17261 13429,17310 13143,17360 12819,17386 12490,17386 12161,17386 11837,17360 11552,17310 11266,17261 11029,17189 10864,17103 10700,17018 10613,16920 10613,16821 10613,16722 10700,16624 10864,16538 11029,16453 11266,16381 11551,16332 11837,16282 12161,16256 12490,16256 12819,16256 13143,16282 13429,16332 13714,16381 13951,16453 14116,16538 14280,16624 14367,16722 14367,16821 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400" text-decoration="underline"><tspan class="TextPosition" x="11958" y="16969"><tspan fill="rgb(0,0,0)" stroke="none">name</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id79">
<rect class="BoundingBox" stroke="none" fill="none" x="15652" y="16255" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 19407,16821 C 19407,16920 19320,17018 19156,17103 18991,17189 18754,17261 18469,17310 18183,17360 17859,17386 17530,17386 17201,17386 16877,17360 16592,17310 16306,17261 16069,17189 15904,17103 15740,17018 15653,16920 15653,16821 15653,16722 15740,16624 15904,16538 16069,16453 16306,16381 16592,16332 16877,16282 17201,16256 17530,16256 17859,16256 18183,16282 18469,16332 18754,16381 18991,16453 19156,16538 19320,16624 19407,16722 19407,16821 L 19407,16821 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 19407,16821 C 19407,16920 19320,17018 19156,17103 18991,17189 18754,17261 18469,17310 18183,17360 17859,17386 17530,17386 17201,17386 16877,17360 16592,17310 16306,17261 16069,17189 15904,17103 15740,17018 15653,16920 15653,16821 15653,16722 15740,16624 15904,16538 16069,16453 16306,16381 16592,16332 16877,16282 17201,16256 17530,16256 17859,16256 18183,16282 18469,16332 18754,16381 18991,16453 19156,16538 19320,16624 19407,16722 19407,16821 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="16407" y="16969"><tspan fill="rgb(0,0,0)" stroke="none">import_date</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id80">
<rect class="BoundingBox" stroke="none" fill="none" x="14366" y="16143" width="646" height="681"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 14367,16822 L 15010,16144"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id81">
<rect class="BoundingBox" stroke="none" fill="none" x="21870" y="2594" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 25625,3160 C 25625,3259 25538,3357 25374,3443 25209,3528 24972,3600 24687,3649 24401,3699 24077,3725 23748,3725 23419,3725 23095,3699 22810,3649 22524,3600 22287,3528 22122,3443 21958,3357 21871,3259 21871,3160 21871,3061 21958,2963 22122,2878 22287,2792 22524,2720 22810,2671 23095,2621 23419,2595 23748,2595 24077,2595 24401,2621 24687,2671 24972,2720 25209,2792 25374,2877 25538,2963 25625,3061 25625,3160 L 25625,3160 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 25625,3160 C 25625,3259 25538,3357 25374,3443 25209,3528 24972,3600 24687,3649 24401,3699 24077,3725 23748,3725 23419,3725 23095,3699 22810,3649 22524,3600 22287,3528 22122,3443 21958,3357 21871,3259 21871,3160 21871,3061 21958,2963 22122,2878 22287,2792 22524,2720 22810,2671 23095,2621 23419,2595 23748,2595 24077,2595 24401,2621 24687,2671 24972,2720 25209,2792 25374,2877 25538,2963 25625,3061 25625,3160 L 25625,3160 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="22128" y="3308"><tspan fill="rgb(0,0,0)" stroke="none">nachgeschrieben</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id82">
<rect class="BoundingBox" stroke="none" fill="none" x="20062" y="1075" width="1706" height="2991"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 20063,1076 L 21766,4064"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id83">
<rect class="BoundingBox" stroke="none" fill="none" x="21241" y="2317" width="527" height="1749"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 21242,2318 L 21766,4064"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id84">
<rect class="BoundingBox" stroke="none" fill="none" x="21765" y="3559" width="658" height="507"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 22421,3560 L 21766,4064"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id85">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="10836" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,11402 C 29271,11501 29184,11599 29020,11685 28855,11770 28618,11842 28332,11891 28047,11941 27723,11967 27394,11967 27065,11967 26741,11941 26455,11891 26170,11842 25933,11770 25768,11685 25604,11599 25517,11501 25517,11402 25517,11303 25604,11205 25768,11120 25933,11034 26170,10962 26455,10913 26741,10863 27065,10837 27394,10837 27723,10837 28047,10863 28332,10913 28618,10962 28855,11034 29020,11120 29184,11205 29271,11303 29271,11402 L 29271,11402 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,11402 C 29271,11501 29184,11599 29020,11685 28855,11770 28618,11842 28332,11891 28047,11941 27723,11967 27394,11967 27065,11967 26741,11941 26455,11891 26170,11842 25933,11770 25768,11685 25604,11599 25517,11501 25517,11402 25517,11303 25604,11205 25768,11120 25933,11034 26170,10962 26455,10913 26741,10863 27065,10837 27394,10837 27723,10837 28047,10863 28332,10913 28618,10962 28855,11034 29020,11120 29184,11205 29271,11303 29271,11402 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26979" y="11550"><tspan fill="rgb(0,0,0)" stroke="none">date</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id86">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="10160" width="1611" height="1245"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,11403"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id87">
<rect class="BoundingBox" stroke="none" fill="none" x="15009" y="16143" width="647" height="681"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 15010,16144 L 15654,16822"/>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id88">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="12078" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,12644 C 29271,12743 29184,12841 29020,12927 28855,13012 28618,13084 28332,13133 28047,13183 27723,13209 27394,13209 27065,13209 26741,13183 26455,13133 26170,13084 25933,13012 25768,12927 25604,12841 25517,12743 25517,12644 25517,12545 25604,12447 25768,12362 25933,12276 26170,12204 26455,12155 26741,12105 27065,12079 27394,12079 27723,12079 28047,12105 28332,12155 28618,12204 28855,12276 29020,12362 29184,12447 29271,12545 29271,12644 L 29271,12644 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,12644 C 29271,12743 29184,12841 29020,12927 28855,13012 28618,13084 28332,13133 28047,13183 27723,13209 27394,13209 27065,13209 26741,13183 26455,13133 26170,13084 25933,13012 25768,12927 25604,12841 25517,12743 25517,12644 25517,12545 25604,12447 25768,12362 25933,12276 26170,12204 26455,12155 26741,12105 27065,12079 27394,12079 27723,12079 28047,12105 28332,12155 28618,12204 28855,12276 29020,12362 29184,12447 29271,12545 29271,12644 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26390" y="12792"><tspan fill="rgb(0,0,0)" stroke="none">startperiod</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.CustomShape">
<g id="id89">
<rect class="BoundingBox" stroke="none" fill="none" x="25516" y="13320" width="3757" height="1133"/>
<path fill="rgb(238,238,238)" stroke="none" d="M 29271,13886 C 29271,13985 29184,14083 29020,14169 28855,14254 28618,14326 28332,14375 28047,14425 27723,14451 27394,14451 27065,14451 26741,14425 26455,14375 26170,14326 25933,14254 25768,14169 25604,14083 25517,13985 25517,13886 25517,13787 25604,13689 25768,13604 25933,13518 26170,13446 26455,13397 26741,13347 27065,13321 27394,13321 27723,13321 28047,13347 28332,13397 28618,13446 28855,13518 29020,13604 29184,13689 29271,13787 29271,13886 L 29271,13886 Z"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 29271,13886 C 29271,13985 29184,14083 29020,14169 28855,14254 28618,14326 28332,14375 28047,14425 27723,14451 27394,14451 27065,14451 26741,14425 26455,14375 26170,14326 25933,14254 25768,14169 25604,14083 25517,13985 25517,13886 25517,13787 25604,13689 25768,13604 25933,13518 26170,13446 26455,13397 26741,13347 27065,13321 27394,13321 27723,13321 28047,13347 28332,13397 28618,13446 28855,13518 29020,13604 29184,13689 29271,13787 29271,13886 Z"/>
<text class="TextShape"><tspan class="TextParagraph" font-family="Liberation Sans, sans-serif" font-size="423px" font-weight="400"><tspan class="TextPosition" x="26448" y="14034"><tspan fill="rgb(0,0,0)" stroke="none">endperiod</tspan></tspan></tspan></text>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id90">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="10160" width="1611" height="2487"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,12645"/>
</g>
</g>
<g class="com.sun.star.drawing.ConnectorShape">
<g id="id91">
<rect class="BoundingBox" stroke="none" fill="none" x="23909" y="10160" width="1611" height="3729"/>
<path fill="none" stroke="rgb(0,0,0)" d="M 23910,10161 L 25518,13887"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

+33
View File
@@ -0,0 +1,33 @@
// JavaScript des NateMan von Niklas Elsbrock
// --- Flashnachrichten EventListener ---
var flashNode;
for (flashNode of document.getElementsByClassName('flash')) {
flashNode.onclick = function () {
this.style.display = 'none';
};
flashNode.onkeydown = function (event) {
if (event.keyCode === 13) {
this.style.display = 'none';
}
};
}
// --- Tabellenzeilen EventListener ---
var trNode;
var href;
for (trNode of document.getElementsByTagName('tr')) {
if (trNode.getAttribute('data-href') !== null) {
trNode.onclick = function () {
window.location = this.getAttribute('data-href');
};
trNode.onkeydown = function (event) {
if (event.keyCode === 13) {
window.location = this.getAttribute('data-href');
}
};
}
}
+507
View File
@@ -0,0 +1,507 @@
/* Cascading Style Sheet des NateMan von Niklas Elsbrock */
:root {
--bg-primary: #ffffff;
--bg-secondary: #eeeeee;
--bg-tertiary: #dddddd;
--fg-main: #000000;
--fg-warn: #ff8000;
--fg-detail: #777777;
--bg-marked: #ffff00;
--header-bg: #87aa25;
--header-fg: #ffffff;
--navbar-bg: #143d59;
--navbar-fg: #ffffff;
--navbar-link-hover-bg: rgba(255, 255, 255, 0.25);
--footer-fg: #777777;
--footer-fg-detail: #cccccc;
--footer-bg: #eeeeee;
--navbar-width: 220px;
--navbar-padding-top: 18px;
--header-height: 80px;
--header-border-width: 2px;
--header-full-height: calc(var(--header-height) + var(--header-border-width));
--labeled-hr-color: #ff8000;
}
@font-face {
font-family: 'Lato';
src: local('Lato Regular'),
url('./font/lato/LatoLatin-Regular.eot') format('embedded-opentype'),
url('./font/lato/LatoLatin-Regular.woff2') format('woff2'),
url('./font/lato/LatoLatin-Regular.woff') format('woff'),
url('./font/lato/LatoLatin-Regular.ttf') format('truetype');
}
@font-face {
font-family: 'Lato';
font-style: italic;
src: local('Lato Italic'),
url('./font/lato/LatoLatin-Italic.eot') format('embedded-opentype'),
url('./font/lato/LatoLatin-Italic.woff2') format('woff2'),
url('./font/lato/LatoLatin-Italic.woff') format('woff'),
url('./font/lato/LatoLatin-Italic.ttf') format('truetype');
}
@font-face {
font-family: 'Lato';
font-weight: bold;
src: local('Lato Bold'),
url('./font/lato/LatoLatin-Bold.eot') format('embedded-opentype'),
url('./font/lato/LatoLatin-Bold.woff2') format('woff2'),
url('./font/lato/LatoLatin-Bold.woff') format('woff'),
url('./font/lato/LatoLatin-Bold.ttf') format('truetype');
}
@font-face {
font-family: 'Font Awesome 5 Free';
font-weight: 900;
font-display: block;
src: url('./font/fontawesome/fa-solid-900.eot') format('embedded-opentype'),
url('./font/fontawesome/fa-solid-900.woff2') format('woff2'),
url('./font/fontawesome/fa-solid-900.woff') format('woff'),
url('./font/fontawesome/fa-solid-900.ttf') format('truetype'),
url('./font/fontawesome/fa-solid-900.svg#svg_fontregular') format('svg');
}
html,
body {
width: 100%;
height: 100%;
position: fixed;
}
body {
margin: 0;
padding: 0;
font-family: 'Lato', sans-serif;
font-size: 16px;
line-height: 1.25;
background-color: var(--bg-primary);
color: var(--fg-main);
}
header {
display: table;
height: var(--header-height);
width: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 1;
background-color: var(--header-bg);
border-bottom: 2px solid #607a18;
overflow-y: hidden;
white-space: nowrap;
user-select: none;
}
header .header-text {
display: table-cell;
height: 100%;
width: 100%;
color: var(--header-fg);
text-decoration: none;
font-size: 40px;
font-weight: bold;
text-align: center;
vertical-align: middle;
}
#nateman-logo-container {
display: block;
position: absolute;
top: 0;
left: 0;
width: var(--navbar-width);
height: var(--header-height);
text-align: center;
}
#nateman-logo {
--img-margin: 10px;
height: calc(var(--header-height) - 2 * var(--img-margin));
margin: var(--img-margin);
}
nav {
width: var(--navbar-width);
height: calc(100% - var(--header-full-height) - var(--navbar-padding-top));
margin-top: var(--header-full-height);
position: fixed;
top: 0;
left: 0;
background-color: var(--navbar-bg);
overflow-x: hidden;
overflow-y: auto;
padding-top: var(--navbar-padding-top);
user-select: none;
}
nav a {
display: block;
padding: 8px 16px;
text-decoration: none;
font-size: 16px;
color: var(--navbar-fg);
}
nav a:hover {
background-color: var(--navbar-link-hover-bg);
text-decoration: none;
}
nav a > span {
display: table-cell;
}
nav a::before {
display: table-cell;
content: attr(data-icon);
width: 27px;
vertical-align: middle;
}
nav hr {
border: var(--navbar-link-hover-bg) solid 3px;
border-radius: 3px;
margin: 10px;
}
#page-section {
background-color: var(--bg-primary);
height: calc(100% - var(--header-full-height));
margin-left: var(--navbar-width);
margin-top: var(--header-full-height);
overflow-x: auto;
overflow-y: scroll;
}
#page {
display: flex;
flex-direction: column;
min-width: min-content;
min-height: 100%;
}
main {
flex: 1;
padding: 18px 25px 30px 25px;
}
main p {
text-align: justify;
}
footer {
display: table;
padding: 8px 10px;
color: var(--footer-fg);
font-size: 14px;
background-color: var(--footer-bg);
border-top: var(--footer-fg) solid 1px;
}
.footer-left,
.footer-right {
display: table-cell;
}
.footer-left {
padding-right: 8px;
border-right: var(--footer-fg-detail) solid 1px;
vertical-align: middle;
}
#school-logo {
height: 35px;
vertical-align: middle;
}
.footer-right {
width: 100%;
padding-left: 8px;
}
#flash-container {
position: absolute;
width: 400px;
bottom: 0px;
right: 0px;
margin: 0px 27px 65px 0px;
display: flex;
flex-wrap: wrap-reverse;
}
.flash,
.flash:hover {
text-decoration: none;
width: inherit;
margin-top: 10px;
padding: 10px;
border: 1px solid;
border-radius: 5px;
cursor: pointer;
transition: 0.2s;
}
.flash-success {
background-color: rgba(0, 255, 0, 0.5);
border-color: #008000 !important;
}
.flash-success:hover {
background-color: rgba(0, 255, 0, 0.7);
}
.flash-warning {
background-color: rgba(255, 255, 0, 0.5);
border-color: #808000 !important;
}
.flash-warning:hover {
background-color: rgba(255, 255, 0, 0.7);
}
.flash-error {
background-color: rgba(255, 0, 0, 0.5);
border-color: #800000 !important;
}
.flash-error:hover {
background-color: rgba(255, 0, 0, 0.6);
}
.table-aligned {
display: table;
box-sizing: border-box;
margin: -2px;
}
.table-aligned > div {
display: table-row;
box-sizing: content-box;
}
.table-aligned > div > div {
display: table-cell;
padding: 2px;
}
.table-aligned > div > div > input[type=text],
.table-aligned > div > div > input[type=password],
.table-aligned > div > div > input[type=email],
.table-aligned > div > div > input[type=date],
.table-aligned > div > div > select {
box-sizing: border-box;
width: 100%;
}
table {
border: 2px solid var(--fg-main);
border-collapse: collapse;
}
table tr.clickable {
cursor: pointer;
}
table tr.clickable:hover,
table tr.clickable:focus {
background-color: var(--bg-tertiary);
outline: none;
}
table tbody tr:nth-child(odd) {
background-color: var(--bg-primary);
}
table tbody tr:nth-child(even) {
background-color: var(--bg-secondary);
}
table th,
table td {
border-top: 1px solid var(--fg-main);
border-right: 1px dotted var(--fg-main);
border-bottom: 1px solid var(--fg-main);
border-left: 1px dotted var(--fg-main);
padding: 4px 6px;
}
table th {
background-color: var(--bg-tertiary);
border-bottom: 2px solid var(--fg-main);
}
[data-icon]::before {
font-family: 'Font Awesome 5 Free';
font-style: normal;
font-weight: normal;
content: attr(data-icon) '\00A0';
}
p {
margin: 0.5em 0;
}
h1, h2, h3, h4, h5, h6 {
margin: 1.2em 0 0.4em 0;
}
.page-heading {
margin: 0.8em 0 0.4em 0;
}
a {
color: inherit;
text-decoration: underline dotted;
}
a:hover {
text-decoration: underline solid;
}
a.scroll-anchor {
visibility: hidden;
color: #999999;
text-decoration: none;
}
a.scroll-anchor::before {
font-family: 'Font Awesome 5 Free';
font-weight: normal;
content: '\f0c1';
}
:hover > a.scroll-anchor {
visibility: inherit;
}
a.scroll-anchor:hover {
color: #555555;
}
.warn {
color: var(--fg-warn);
}
.warn::before {
content: '\f071\00A0';
}
.detail {
color: var(--fg-detail);
}
.description {
font-style: italic;
}
.negative-status {
color: #bb0000;
font-weight: bold;
}
.negative-status::before {
content: '\f00d\00A0';
}
.positive-status {
color: #00bb00;
}
.positive-status::before {
content: '\f00c\00A0';
}
.warn::before,
.negative-status::before,
.positive-status::before {
font-family: 'Font Awesome 5 Free';
font-weight: normal;
}
.marked {
border-radius: 3px;
background-color: var(--bg-marked);
}
.monospace {
font-family: 'Consolas', monospace;
}
hr,
.labeled-hr::after {
border: var(--bg-secondary) solid 3px;
border-radius: 3px;
margin: 25px 0;
}
.labeled-hr {
display: flex;
margin: 20px 0;
color: var(--labeled-hr-color);
font-weight: bold;
white-space: nowrap;
}
.labeled-hr::after {
content: '';
width: 100%;
height: 0;
border-color: var(--labeled-hr-color);
margin: 7px 15px;
}
button.plain,
input[type=submit].plain {
background: none;
border: none;
padding: 0;
font-family: inherit;
font-size: inherit;
font-weight: inherit;
line-height: inherit;
cursor: pointer;
}
button[disabled].plain,
input[type=submit][disabled].plain {
cursor: default;
}
fieldset {
border: none;
margin: 0;
padding: 0;
}
input.small {
width: 40px;
}
@media only screen and (max-width: 1100px) {
.header-text .optional {
display: none;
}
}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/admin/index.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Administration{% endblock %}
{% block header %}Administration{% endblock %}
{% block content %}
<p><a href="{{ url_for('admin.lehrer.index') }}" data-icon="&#xf0c0;">Lehrerkonten</a></p>
<p><a href="{{ url_for('admin.sql_access') }}" data-icon="&#xf1c0;">SQL-Zugriff</a></p>
{% endblock %}
@@ -0,0 +1,45 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/admin/lehrer/add.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Lehrer(in) hinzufügen{% endblock %}
{% block header %}Lehrer(in) hinzufügen{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div><label for="kuerzel-input">Lehrerkürzel:</label></div>
<div><input type="text" name="kuerzel" id="kuerzel-input" autocomplete="off" required autofocus></div>
</div>
<div>
<div><label for="password-input">Passwort:</label></div>
<div><input type="password" name="password" id="password-input" autocomplete="off" required></div>
</div>
</div>
<label>
<input type="checkbox" name="force-password-change" id="force-password-change-cb">
bei Erstanmeldung Passwortänderung erzwingen
</label>
<p><input type="submit" value="Hinzufügen"></p>
</form>
{% endblock %}
@@ -0,0 +1,90 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/admin/lehrer/edit.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Lehrer(in): {{ lehrer.kuerzel }}{% endblock %}
{% block header %}Lehrer(in): {{ lehrer.kuerzel }}{% endblock %}
{# lehrer #}
{% set stufen_list = Stufe.query.all() %}
{% block js_head %}
var delete_warn = "Durch das Löschen eines Lehrerkontos werden alle Klausuren,\ndie dem gelöschten Konto zugeordnet "
+ "sind, unwiderruflich gelöscht.\nWollen Sie wirklich fortfahren?"
{% endblock %}
{% block content %}
<form method="post">
<input name="action" type="hidden" value="change-credentials">
<div class="table-aligned">
<div>
<div><label for="new-kuerzel-input">Lehrerkürzel:</label></div>
<div><input type="text" name="new-kuerzel" id="new-kuerzel-input" value="{{ lehrer.kuerzel }}" required></div>
</div>
<div>
<div><label for="new-email-input">E-Mail-Adresse:</label></div>
<div>
<input type="email" name="new-email" id="new-email-input"
value="{% if lehrer.email %}{{ lehrer.email }}{% endif %}" autocomplete="off">
</div>
{% if lehrer.email is not none %}
<div>
{% if lehrer.is_confirmed %}
<span class="positive-status" title="bestätigt"></span>
{% else %}
<span class="negative-status">nicht bestätigt</span>
{% endif %}
</div>
{% endif %}
</div>
<div>
<div><label for="new-password-input">Neues Passwort:</label></div>
<div><input type="password" name="new-password" id="new-password-input" autocomplete="new-password"></div>
</div>
<div>
<div><label for="new-beraet-select">Beratungslehrer(in) von:</label></div>
<div><select name="new-beraet" id="new-beraet-select">
<option value="">(keine Stufe)</option>
{% for stufe in stufen_list %}
<option {% if stufe.name == lehrer.beraet.name %}selected{% endif %}>{{ stufe.name }}</option>
{% endfor %}
</select></div>
</div>
<div>
<div><label for="new-admin-cb">Administrator(in):</label></div>
<div>
<input type="checkbox" name="new-admin" id="new-admin-cb" value="admin"
{% if lehrer.is_admin %}checked{% endif %}>
</div>
</div>
</div>
<p><input type="submit" value="Speichern"></p>
</form>
<br>
<form method="post">
<h3>Benutzerkonto löschen</h3>
<input name="action" type="hidden" value="delete-account">
<p><input onclick="return confirm(delete_warn)" type="submit" value="Benutzerkonto jetzt löschen"></p>
</form>
{% endblock %}
@@ -0,0 +1,69 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/admin/lehrer/index.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Lehrerkonten{% endblock %}
{% block header %}Lehrerkonten{% endblock %}
{% set lehrer_list = Lehrer.query.order_by(Lehrer.kuerzel).all() %}
{% block content %}
<p><a href="{{ url_for('admin.lehrer.add') }}" data-icon="&#xf234;">Lehrer(in) hinzufügen</a></p>
<p>Klicken Sie eine Zeile aus der folgenden Übersicht an, um ein bestehendes Benutzerkonto zu bearbeiten.</p>
<table>
<thead>
<tr>
<th>Kürzel</th>
<th>E-Mail-Adresse</th>
<th>Admin</th>
<th>Beratungslehrer(in)</th>
<th>Passwort<br>gesetzt</th>
</tr>
</thead>
<tbody>
{% for l in lehrer_list %}
<tr class="clickable" tabindex="0" data-href="{{ url_for('admin.lehrer.edit', lehrer_id=l.id) }}">
<td>{{ l.kuerzel }}</td>
<td>
{% if l.email is not none %}
{{ l.email }}
{% if l.is_confirmed %}
<span class="positive-status" title="bestätigt"></span>
{% else %}
<span class="negative-status" title="nicht bestätigt"></span>
{% endif %}
{% else %}
<span class="detail">(keine)</span>
{% endif %}
</td>
<td>{{ 'ja' if l.is_admin else 'nein' }}</td>
<td>{{ l.beraet.name if l.beraet is not none else '<span class="detail">(keine Stufe)</span>' }}</td>
{% if l.pwd_changed %}
<td class="positive-status">ja</td>
{% else %}
<td class="negative-status">nein</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
@@ -0,0 +1,83 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/admin/sql_access.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}SQL-Zugriff{% endblock %}
{% block header %}SQL-Zugriff{% endblock %}
{# result: Ergebnis einer SQL-Abfrage als sqlalchemy.engine.ResultProxy #}
{% block content %}
<p>
Diese Seite erlaubt direkten Zugriff auf die SQL-Datenbank von NateMan durch die Eingabe von SQL-Abfragen.<br>
<b>
Bei falscher Anwendung können Daten unwiderruflich verloren gehen.<br>
Außerdem kann es bei der Veränderung bestimmter Daten zu unerwarteten Fehlern in der NateMan-Anwendung kommen.<br>
<span class="marked">Benutzen Sie diese Seite nur, wenn Sie wissen, was Sie tun.</span>
</b>
</p>
<p>
{% set nateman_erm_url = url_for('static', filename='img/nateman-erm.svg') %}
<a href="{{ nateman_erm_url }}" target="_blank" rel="noreferrer noopener">
<img src="{{ nateman_erm_url }}" height="500" alt="Entity-Relationship-Modell der NateMan-Datenbank"
title="Entity-Relationship-Modell der NateMan-Datenbank">
</a>
</p>
<form method="post">
<p>
<textarea name="query" class="monospace" rows="8" cols="96" placeholder="SQL-Abfrage hier eingeben"
required autofocus>{{ query }}</textarea>
</p>
<p><input type="submit" value="Ausführen"></p>
</form>
{% if result is not none and result.returns_rows %}
{% set result_rows = result.fetchall() %}
<h3>Ergebnis ({{ result_rows|length }} Zeilen):</h3>
<table class="monospace">
<thead>
<tr>
{% for col_name in result.keys() %}
<th>{{ col_name }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for row in result_rows %}
<tr>
{% for value in row._mapping.values() %}
{% if value is none %}
<td class="detail">NULL</td>
{% else %}
<td>{{ value }}</td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
+67
View File
@@ -0,0 +1,67 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/auth/account.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Benutzereinstellungen{% endblock %}
{% block header %}Benutzereinstellungen{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div><label for="current-password-input">Aktuelles Passwort:</label></div>
<div>
<input type="password" name="current-password" id="current-password-input" autocomplete="current-password"
required autofocus>
</div>
</div>
<div>
<div><label for="new-email-input">E-Mail-Adresse:</label></div>
<div>
<input type="email" name="new-email" id="new-email-input"
value="{% if g.lehrer.email %}{{ g.lehrer.email }}{% endif %}">
</div>
{% if g.lehrer.email is not none %}
<div>
{% if g.lehrer.is_confirmed %}
<span class="positive-status" title="bestätigt"></span>
{% else %}
<span class="negative-status">nicht bestätigt</span>
{% endif %}
</div>
{% endif %}
</div>
<div>
<div><label for="new-password-input">Neues Passwort:</label></div>
<div>
<input type="password" name="new-password" id="new-password-input" autocomplete="new-password" minlength="6">
</div>
</div>
<div>
<div><label for="new-password-confirm-input">&#x21B3; wiederholen:</label></div>
<div>
<input type="password" name="new-password-confirm" id="new-password-confirm-input" autocomplete="new-password">
</div>
</div>
</div>
<p><input type="submit" value="Speichern"></p>
</form>
{% endblock %}
+48
View File
@@ -0,0 +1,48 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/auth/login.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Anmelden{% endblock %}
{% block header %}Anmelden{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div><label for="kuerzel-input">Lehrerkürzel:</label></div>
<div><input type="text" name="kuerzel" id="kuerzel-input" autocomplete="username" required autofocus></div>
</div>
<div>
<div><label for="password-input">Passwort:</label></div>
<div><input type="password" name="password" id="password-input" autocomplete="current-password" required></div>
</div>
<div>
<div><label for="remember-me-cb">Angemeldet bleiben:</label></div>
<div><input type="checkbox" name="remember-me" id="remember-me-cb"></div>
</div>
</div>
<p>
<input type="submit" value="Anmelden">
<a href="{{ url_for('auth.password_reset') }}">Passwort vergessen</a>
</p>
</form>
{% endblock %}
@@ -0,0 +1,48 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/auth/password-change.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Neues Passwort{% endblock %}
{% block header %}Neues Passwort{% endblock %}
{% block content %}
<p>Bitte geben Sie ein neues Passwort für Ihr Benutzerkonto ein.</p>
<form method="post">
<div class="table-aligned">
<div>
<div><label for="new-password-input">Neues Passwort:</label></div>
<div>
<input type="password" name="new-password" id="new-password-input" autocomplete="new-password" minlength="6"
required autofocus>
</div>
</div>
<div>
<div><label for="new-password-confirm-input">&#x21B3; wiederholen:</label></div>
<div>
<input type="password" name="new-password-confirm" id="new-password-confirm-input" autocomplete="new-password"
required>
</div>
</div>
</div>
<p><input type="submit" value="Speichern"></p>
</form>
{% endblock %}
@@ -0,0 +1,46 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/auth/password-reset-do.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Passwort zurücksetzen{% endblock %}
{% block header %}Passwort zurücksetzen{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div><label for="new-password-input">Neues Passwort:</label></div>
<div>
<input type="password" name="new-password" id="new-password-input" autocomplete="new-password" minlength="6"
required autofocus>
</div>
</div>
<div>
<div><label for="new-password-confirm-input">&#x21B3; wiederholen:</label></div>
<div>
<input type="password" name="new-password-confirm" id="new-password-confirm-input" autocomplete="new-password"
required>
</div>
</div>
</div>
<p><input type="submit" value="Passwort setzen"></p>
</form>
{% endblock %}
@@ -0,0 +1,43 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/auth/password-reset-send.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Passwort zurücksetzen{% endblock %}
{% block header %}Passwort zurücksetzen{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div><label for="lehrer-kuerzel-input">Lehrerkürzel:</label></div>
<div>
<input type="text" name="lehrer-kuerzel" id="lehrer-kuerzel-input" autocomplete="username" required autofocus>
</div>
</div>
<div>
<div><label for="email-address-input">E-Mail-Adresse:</label></div>
<div><input type="email" name="email-address" id="email-address-input" required></div>
</div>
</div>
<p><input type="submit" value="Absenden"></p>
</form>
{% endblock %}
+203
View File
@@ -0,0 +1,203 @@
<!DOCTYPE html>
{# von Niklas Elsbrock #}
{% macro zeitraum(klausur) -%}
{{- klausur.startperiod }}.
{%- if klausur.startperiod != klausur.endperiod -%}
&ndash;{{ klausur.endperiod }}.
{%- endif %}
{%- endmacro %}
<!-- generiert aus Template-Code von Niklas Elsbrock -->
<html lang="de">
<head>
<meta charset="utf-8">
<title>{% block title %}{% endblock %} &ndash; NateMan</title>
<link rel="icon" type="image/png" sizes="192x192"
href="{{ url_for('static', filename='img/logo.png') }}">
<link rel="apple-touch-icon" href="{{ url_for('static', filename='img/icon-apple.png') }}">
<!--[if !IE]><!-->
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
<!--<![endif]-->
<script>
window.onload = function() {
{% for message in get_flashed_messages(with_categories=True, category_filter='alert') %}
alert({{ message[1] | tojson }});
{% endfor %}
{% block js_window_onload %}{% endblock %}
};
{% block js_head %}{% endblock %}
</script>
{% block head %}{% endblock %}
</head>
<body>
<header>
<a id="nateman-logo-container" href="{{ url_for('klausuren.mine' if g.lehrer is not none else 'index.index') }}">
<img id="nateman-logo" alt="NateMan Logo"
src="{{ url_for('static', filename='img/logo.png') }}" draggable="false">
</a>
<h1 class="header-text">NateMan<span class="optional">&nbsp;&ndash;&nbsp;Nachschreibtermin-Manager</span></h1>
</header>
<!--[if IE]>
<p style="color: #ff0000; font-size: 25px;">
Diese Seite wird im Internet Explorer nicht richtig angezeigt.<br>
Um sie richtig angezeigt zu bekommen, benutzen Sie einen anderen Browser.
</p>
<![endif]-->
<nav>
{% if g.lehrer is not none %}
<a href="{{ url_for('auth.logout') }}" data-icon="&#xf2f5;">
<span>
Angemeldet als <b>{{ g.lehrer.kuerzel }}</b><br>
<b>Abmelden</b>
</span>
</a>
{% else %}
<a href="{{ url_for('auth.login') }}" data-icon="&#xf2f6;">
<span>Anmelden</span>
</a>
<a href="{{ url_for('auth.password_reset') }}" data-icon="&#xf1cd;">
<span>Passwort vergessen</span>
</a>
{% endif %}
<hr>
{% if g.lehrer is not none and g.lehrer.pwd_changed %}
<a href="{{ url_for('klausuren.mine') }}" data-icon="&#xf015;">
<span>Meine Klausuren</span>
</a>
{% endif %}
{% if g.lehrer is none or g.lehrer.pwd_changed %}
{% for stufe in Stufe.query.all() %}
<a href="{{ url_for('klausuren.stufe', stufe_name=stufe.name) }}" data-icon="&#xf00b;">
<span>Klausuren {{ stufe.name }}</span>
</a>
{% endfor %}
{% endif %}
{% if g.lehrer is not none and g.lehrer.pwd_changed %}
{% if g.lehrer.can_access() %}
<a href="{{ url_for('schueler.versaeumnisse') }}" data-icon="&#xf5ae;">
<span>Versäumnisse</span>
</a>
{%
if Klausurteilnahme.query.join(Klausur)
.filter(Klausurteilnahme.versaeumt)
.filter(Klausurteilnahme.nachgeschrieben == false)
.filter(Klausur.stufe_name.in_(g.lehrer.accessible_stufen(names=True)))
.count() != 0
%}
<hr>
<a href="{{ url_for('fileio.export') }}" data-icon="&#xf56e;">
<span>Nachschreibplan exportieren</span>
</a>
{% elif g.lehrer.is_admin %}
<hr>
{% endif %}
{% if g.lehrer.is_admin %}
<a href="{{ url_for('fileio.import') }}" data-icon="&#xf56f;">
<span>Klausurpläne importieren</span>
</a>
{% endif %}
{% endif %}
<hr>
<a href="{{ url_for('auth.account') }}" data-icon="&#xf4fe;">
<span>Mein Konto</span>
</a>
{% if g.lehrer.is_admin %}
<a href="{{ url_for('admin.index') }}" data-icon="&#xf084;">
<span>Administration</span>
</a>
{% endif %}
{% endif %}
</nav>
<div id="flash-container">
{% for message in get_flashed_messages(with_categories=True) %}
{% if message[0] != 'alert' %}
<div class="flash flash-{{ message[0] }}" tabindex="0">
{{ message[1] | replace('\n', '<br>') }}
</div>
{% endif %}
{% endfor %}
</div>
<div id="page-section">
<div id="page">
<main>
<noscript>
<p class="warn">
JavaScript ist in Ihrem Browser deaktiviert bzw. nicht unterstützt.
Diese Seite benötigt JavaScript, um richtig zu funktionieren.
</p>
</noscript>
{% if g.lehrer and g.lehrer.pwd_changed %}
{% if g.lehrer.email is none %}
<p class="warn">{#
#}Sie haben keine E-Mail-Adresse festgelegt.
<a href="{{ url_for('auth.account') }}">Festlegen</a>
</p>
{% elif not g.lehrer.is_confirmed %}
<p class="warn">Sie haben Ihre E-Mail-Adresse noch nicht bestätigt.</p>
{% endif %}
{% endif %}
<h2 class="page-heading">{% block header %}{% endblock %}</h2>
{% block content %}{% endblock %}
</main>
<footer>
<div class="footer-left">
<a href="{{ nateman_config['schule']['website-url'] }}">
<img id="school-logo"
src="{{ nateman_config['schule'].get('schule.logo-url') or url_for('static', filename='img/school-logo.png') }}"
alt="Schullogo" draggable="false">
</a>
</div>
<div class="footer-right">
<span style="float: left">
<a href="{{ nateman_config['schule']['website-url'] }}">
{{ nateman_config['schule']['name'] }}
</a>
<br>
<a href="https://github.com/nelsbrock/NateMan">
NateMan&nbsp;&ndash;&nbsp;Nachschreibtermin-Manager
</a>
</span>
<span style="float: right">
<a href="{{ nateman_config['schule']['imprint-url'] }}">Impressum</a>
&middot;
<a href="{{ nateman_config['schule']['privacy-policy-url'] }}">Datenschutz</a>
&middot;
<a href="{{ url_for('info.licenses') }}">Font-Lizenzen</a>
</span>
</div>
</footer>
</div>
</div>
<script src="{{ url_for('static', filename='script.js') }}" charset="utf-8"></script>
<script>
{% block js_body_end %}{% endblock %}
</script>
</body>
</html>
+37
View File
@@ -0,0 +1,37 @@
<!DOCTYPE html>
{#
NateMan Nachschreibtermin-Manager
templates/email/base.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
<html lang="de">
<head>
<meta charset="utf-8">
</head>
<body>
<h2>{% block header %}{% endblock %}</h2>
{% block content %}{% endblock %}
<hr>
<aside style="color: #777777">
Diese E-Mail wurde automatisch versandt. Eine Antwort ist nicht nötig.
</aside>
</body>
</html>
@@ -0,0 +1,30 @@
{% extends 'email/base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/email/confirmation.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block header %}Bestätigung Ihrer E-Mail-Adresse für NateMan{% endblock %}
{% block content %}
<p>
Um die E-Mail-Adresse für Ihr Benutzerkonto beim Nachschreibtermin-Manager zu
bestätigen, klicken Sie <a href="{{ url_for('auth.confirm_email', token=token, _external=True) }}">hier</a>.
</p>
{% endblock %}
@@ -0,0 +1,31 @@
{% extends 'email/base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/email/password-reset.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block header %}Passwortzurücksetzung{% endblock %}
{% block content %}
<p>
Für Ihr Benutzerkonto beim Nachschreibtermin-Manager wurde eine Passwortzurücksetzung beantragt.<br>
Sie können Ihr Passwort <a href="{{ url_for('auth.password_reset', token=token, _external=True) }}">hier</a> ändern.
Der Link ist eine Stunde lang gültig.
</p>
{% endblock %}
+43
View File
@@ -0,0 +1,43 @@
{% extends 'email/base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/email/reminder.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block header %}Zur Erinnerung{% endblock %}
{% block content %}
<p>
Folgende Klausuren müssen noch bearbeitet werden:
<ul>
{% for k in not_edited_list %}
<li>
<a href="{{ url_for('klausuren.edit', klausur_id=k.id, _external=True) }}">
{{ k.kursname }} ({{ k.date_formatted() }}; {{ k.stufe.name }})
</a>
</li>
{% endfor %}
</ul>
</p>
<p>
Klicken Sie <a href="{{ url_for('klausuren.mine', _external=True) }}">hier</a>,
um alle Klausuren von Ihnen zu sehen.
</p>
{% endblock %}
+33
View File
@@ -0,0 +1,33 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/error/400.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Fehler{% endblock %}
{% block header %}Fehler{% endblock %}
{% block content %}
<p>Ihr Browser hat eine ungültige Anfrage gesendet.</p>
<p>
Dies kann passieren, wenn Sie versuchen Daten zu verändern,<br>
die in der Zwischenzeit von anderer Stelle verändert bzw. entfernt wurden.<br>
Versuchen Sie, die gerade ausgeführte Aktion zu wiederholen.
</p>
<p class="detail">400 BAD REQUEST</p>
{% endblock %}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/error/403.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Kein Zugriff{% endblock %}
{% block header %}Kein Zugriff{% endblock %}
{% block content %}
<p>Auf diese Seite haben Sie keinen Zugriff.</p>
<p class="detail">403 FORBIDDEN</p>
{% endblock %}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/error/404.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Fehler{% endblock %}
{% block header %}Fehler{% endblock %}
{% block content %}
<p>Diese Seite existiert nicht.</p>
<p class="detail">404 NOT FOUND</p>
{% endblock %}
+28
View File
@@ -0,0 +1,28 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/error/500.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Serverfehler{% endblock %}
{% block header %}Hoppala!{% endblock %}
{% block content %}
<p>Es ist ein serverseitiger Fehler aufgetreten.</p>
<p class="detail">500 INTERNAL SERVER ERROR</p>
{% endblock %}
+88
View File
@@ -0,0 +1,88 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/fileio/import.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Klausurpläne importieren{% endblock %}
{% block header %}Klausurpläne importieren{% endblock %}
{% set stufen_list = Stufe.query.all() %}
{% block js_head %}
var plan_delete_warn = "Durch das Löschen eines Plans werden alle importierten sowie nachträglich hinzugefügten\n"
+ "Daten der Stufe (Klausurtermine, Klausuren, Schüler(innen)) unwiderruflich gelöscht.\n"
+ "Lehrerkonten bleiben unberührt.\n\nWollen Sie wirklich fortfahren?";
var import_warn = "Durch das Importieren von Klausurplänen werden bestehende importierte sowie nachträglich "
+ "hinzugefügte\nDaten (Klausurtermine, Klausuren, Schüler(innen)) aller Stufen, für die neue Pläne "
+ "importiert wurden, unwiderruflich gelöscht.\nBestehende Lehrerkonten bleiben unberührt.\n\n"
+ "Durch das Importieren von Koopschüler(inne)n werden alle bestehenden Koopschüler(innen) "
+ "gelöscht.\n\nWollen Sie wirklich fortfahren?";
{% endblock %}
{% block js_body_end %}
document.getElementById("import-button").onclick = function () {
if (!confirm(import_warn)) {
return false;
}
this.disabled = true;
this.value = 'Bitte warten...';
this.form.submit();
return true;
}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<div class="table-aligned">
{% for stufe in stufen_list %}
<div>
<div><label for="plan_{{ stufe.name }}-input">Plan für {{ stufe.name }}:</label></div>
<div><input type="file" name="plan_{{ stufe.name }}" id="plan_{{ stufe.name }}-input" accept="text/xml"></div>
<div>
<input type="submit" name="del_{{ stufe.name }}" value="Plan löschen"
onclick="return confirm(plan_delete_warn)" {% if stufe.import_date is none %}disabled{% endif %}>
</div>
<div class="detail">
{% if stufe.import_date is none %}
nicht importiert
{% else %}
importiert am {{ stufe.import_date.strftime("%d.%m.%Y") }}
{% endif %}
</div>
</div>
{% endfor %}
</div>
<p>
<label>
Koopschüler(innen)liste:
<input type="file" name="koopschueler" id="koopschueler-input" accept=".xlsx,.xlsm,.xltx,.xltm">
</label>
</p>
<p>
<label>
Passwort für neu registrierte Lehrer(innen):
<input name="new-lehrer-password" type="text" id="new-lehrer-password-input"
value="{{ nateman_config['default-new-lehrer-password'] }}">
</label>
</p>
<p><input type="submit" value="Importieren" id="import-button"></p>
</form>
{% endblock %}
+35
View File
@@ -0,0 +1,35 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/index/index.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Startseite{% endblock %}
{% block header %}Startseite{% endblock %}
{% block content %}
<p>
Sie befinden sich auf der Startseite des Nachschreibtermin-Managers.<br>
Von hier aus können Sie die Klausurpläne für die Stufen
{% for stufe in Stufe.query.all() -%}
{%- if not loop.first -%}{%- if loop.last %} und {% else -%}, {% endif -%}{%- endif -%}
<a href="{{ url_for('klausuren.stufe', stufe_name=stufe.name) }}">{{ stufe.name }}</a>
{%- endfor %}
einsehen oder sich als Lehrer <a href="{{ url_for('auth.login') }}">anmelden</a>.
</p>
{% endblock %}
+38
View File
@@ -0,0 +1,38 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/info/licenses.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Lizenzen{% endblock %}
{% block header %}Lizenzen{% endblock %}
{% block content %}
<h3>Schriftart: Lato</h3>
<p>
Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com), with Reserved Font Name Lato.<br>
Licensed under the <a href="https://scripts.sil.org/OFL">SIL Open Font License, Version 1.1</a>.
</p>
<h3>Symbole (Icons): Font Awesome Free</h3>
<p>
Font Awesome Free 5.13.1 by @fontawesome - <a href="https://fontawesome.com">https://fontawesome.com</a><br>
License - <a href="https://fontawesome.com/license/free">https://fontawesome.com/license/free</a>
(Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
</p>
{% endblock %}
+78
View File
@@ -0,0 +1,78 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/klausuren/add.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Klausur hinzufügen{% endblock %}
{% block header %}Klausur hinzufügen{% endblock %}
{% block js_body_end %}
var startperiod_input = document.getElementById('startperiod-input');
var endperiod_input = document.getElementById('endperiod-input');
startperiod_input.onchange = function () {
endperiod_input.min = parseInt(startperiod_input.value);
}
// beim Laden der Seite einmal ausführen
startperiod_input.onchange();
{% endblock %}
{% block content %}
<form method="post">
<div class="table-aligned">
<div>
<div>Stufe:</div>
<div>{{ stufe.name }}</div>
</div>
<div>
<div><label for="kursname-input">Kursname:</label></div>
<div><input type="text" name="kursname" id="kursname-input" placeholder="z.B. M-GK3" required autofocus></div>
</div>
<div>
<div><label for="lehrer-select">Kurslehrer(in):</label></div>
<div>
<select name="lehrer" id="lehrer-select" required>
<option value="" selected disabled>Bitte auswählen</option>
{% for l in Lehrer.query.order_by(Lehrer.kuerzel).all() %}
<option value="{{ l.id }}">{{ l.kuerzel }}</option>
{% endfor %}
</select>
</div>
</div>
<div>
<div><label for="date-input">Klausurdatum:</label></div>
<div><input type="date" name="date" id="date-input" required></div>
</div>
<div>
<div>Klausurzeitraum:</div>
<div>
<input type="number" name="startperiod" id="startperiod-input" class="small" min="0" max="2147483647"
required>{#
#}. bis
<input type="number" name="endperiod" id="endperiod-input" class="small" min="0" max="2147483647"
required>{#
#}. Stunde
</div>
</div>
</div>
<p><input type="submit" value="Hinzufügen"></p>
</form>
{% endblock %}
+348
View File
@@ -0,0 +1,348 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/klausuren/edit.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}
Klausur: {{ klausur.kursname }}
({{ klausur.date_formatted() }}; {{ klausur.lehrer.kuerzel }}, {{ klausur.stufe.name }})
{% endblock %}
{% block header %}
Klausur: {{ klausur.kursname }}
({{ klausur.date_formatted() }}; {{ klausur.lehrer.kuerzel }}, {{ klausur.stufe.name }})
{% endblock %}
{# klausur #}
{# kt_list: Liste aller Klausurteilnahmen dieser Klausur #}
{# not_in_klausur_list: Liste aller Schüler dieser Stufe, die nicht in dieser Klausur sind #}
{% set lehrer_can_access = g.lehrer.can_access(klausur.stufe) %}
{% set is_bygone = klausur.is_bygone() %}
{% set no_edit = (klausur.edited or not is_bygone) and not lehrer_can_access %}
{% block js_body_end %}
var schuelerCBs = document.getElementsByClassName("schueler-cb");
for (scb of schuelerCBs) {
scb.onchange = function () {
if (this.checked) {
this.parentNode.classList.add("marked");
} else {
this.parentNode.classList.remove("marked");
}
}
// beim Laden der Seite einmal ausführen
scb.onchange();
}
{% if not no_edit %}
var noneVersaeumtCB = document.getElementById("none-versaeumt");
noneVersaeumtCB.onchange = function () {
for (scb of schuelerCBs) {
scb.disabled = this.checked;
if (this.checked) {
scb.checked = false;
scb.onchange();
}
}
};
// beim Laden der Seite einmal ausführen
noneVersaeumtCB.onchange();
{% if lehrer_can_access %}
var laengeSelect = document.getElementById("laenge-select");
var flagAsEditedCb = document.getElementById("flag-as-edited-cb");
flagAsEditedCb.onchange = function () {
laengeSelect.required = this.checked;
}
// beim Laden der Seite einmal ausführen
flagAsEditedCb.onchange();
{% endif %}
var editSubmit = document.getElementById("edit-submit");
editSubmit.onclick = function () {
if (!noneVersaeumtCB.checked) {
var ok = false;
for (scb of schuelerCBs) {
if (scb.checked) {
ok = true;
break;
}
}
if (!ok {% if lehrer_can_access %} && flagAsEditedCb.checked {% endif %}) {
alert("Bitte wählen Sie etwas aus.");
return false;
}
}
{% if not lehrer_can_access %}
return confirm("Wollen Sie wirklich speichern?\nSie können die Klausur danach nicht mehr bearbeiten.");
{% else %}
return true;
{% endif %}
};
var selectNode = document.getElementById("added-schueler");
var addNewKoopSchuelerFormNode = document.getElementById("add-new-schueler-form");
var nksNachnameInputNode = document.getElementById("new-schueler-nachname-input");
var nksVornameInputNode = document.getElementById("new-schueler-vorname-input");
selectNode.onchange = function() {
if (selectNode.value === "new-schueler") {
addNewKoopSchuelerFormNode.style.display = "";
nksNachnameInputNode.required = true;
nksVornameInputNode.required = true;
} else {
addNewKoopSchuelerFormNode.style.display = "none";
nksNachnameInputNode.required = false;
nksVornameInputNode.required = false;
}
};
// beim Laden der Seite einmal ausführen
selectNode.onchange();
{% endif %}
{% if lehrer_can_access %}
var new_startperiod_input = document.getElementById('new-startperiod-input');
var new_endperiod_input = document.getElementById('new-endperiod-input');
new_startperiod_input.onchange = function () {
new_endperiod_input.min = parseInt(new_startperiod_input.value);
}
// beim Laden der Seite einmal ausführen
new_startperiod_input.onchange();
{% endif %}
{% endblock %}
{% block content %}
{% if not is_bygone %}
<p class="warn">Diese Klausur hat noch nicht stattgefunden.</p>
{% endif %}
{% if klausur.edited %}
<p class="warn">Diese Klausur wurde bereits bearbeitet.</p>
{% endif %}
<p class="description">
{{ zeitraum(klausur) }} Stunde;
{{ Klausurteilnahme.query.filter_by(klausur_id=klausur.id).count() }} Schüler(innen)
</p>
<form method="post">
<input type="hidden" name="action" value="edit">
<p>
<label>
Länge der Klausur:
<select name="laenge" id="laenge-select" required {% if no_edit %} disabled {% endif %}>
<option value="" {% if klausur.laenge is none %} selected {% endif %}
{% if not lehrer_can_access %} disabled {% endif %}>Bitte auswählen</option>
{% for l in nateman_config['klausuren']['klausurlaengen'] %}
<option value="{{ l }}" {% if l == klausur.laenge %} selected {% endif %}>{{ l }} Minuten</option>
{% endfor %}
</select>
</label>
</p>
{% if not no_edit %}
<p>
Setzen Sie <i>entweder</i> ein Häkchen dafür, dass kein(e) Schüler(in) die Klausur versäumt hat<br>
<i>oder</i> setzen Sie ein Häkchen bei allen Schüler(inne)n, die die Klausur versäumt haben.<br>
Gehört ein(e) Schüler(in) <i>nicht</i> mehr zum Kurs, entfernen Sie diese(n) durch Anklicken von 'x'.<br>
Klicken Sie anschließend auf 'Speichern'.
</p>
{% endif %}
<p>
<label>
<input type="checkbox" id="none-versaeumt" {% if no_edit %} disabled {% endif %}
{%
if klausur.edited and Klausurteilnahme.query.filter_by(klausur=klausur).filter_by(versaeumt=True).count() == 0
%}
checked
{% endif %}>
<b>kein(e)</b> Schüler(in) hat versäumt
</label>
</p>
<p id="schueler-list">
{% for kt in kt_list %}
<label class="schueler-cb-container">
<input type="checkbox" name="s_{{ kt.schueler.id }}" id="s_{{ kt.schueler.id }}" class="schueler-cb"
{% if kt.versaeumt %} checked {% endif %} {% if no_edit %} disabled {% endif %}>
{{ kt.schueler.nachname }}, {{ kt.schueler.vorname }}
<span class="detail">
({% if kt.schueler.stammschule is not none %}{{ kt.schueler.stammschule.name }},
{% endif %}{{ kt.schueler.id }})
</span>
</label>
<input type="submit" form="remove-form" name="r_{{ kt.schueler.id }}" class="plain" value="&#xD7;"
title="entfernen" {% if no_edit %} disabled {% endif %}>
<br>
{% endfor %}
</p>
<p>
<label>
Bemerkung:
<input type="text" name="annotation" maxlength="{{ nateman_config['klausuren']['max-annotation-length'] }}"
value="{% if klausur.annotation %}{{ klausur.annotation }}{% endif %}" placeholder="optional"
{% if no_edit %} disabled {% endif %}>
</label>
</p>
{% if lehrer_can_access %}
<p>
<label>
<input type="checkbox" name="flag-as-edited" id="flag-as-edited-cb"
{% if is_bygone %} checked {% endif %}>
als bearbeitet markieren
</label>
</p>
{% endif %}
<p><input type="submit" id="edit-submit" value="Speichern" {% if no_edit %} disabled {% endif %}></p>
</form>
<form id="remove-form" method="post">
<input type="hidden" name="action" value="remove-schueler">
</form>
{% if not no_edit %}
<hr>
<form method="post">
<input type="hidden" name="action" value="add-schueler">
<p>
Fügen Sie eine(n) Schüler(in) hinzu, falls der/die Schüler(in) nicht bereits<br>
automatisch in der obigen Liste aufgeführt sein sollte.<br>
Nach dem Hinzufügen kann der/die Schüler(in) als versäumend markiert werden.
</p>
<h3>Schüler(in) hinzufügen:
<select name="added-schueler" id="added-schueler" required>
<option value="" selected disabled>Bitte auswählen</option>
<option value="new-schueler">Neue(n) Schüler(in) hinzufügen...</option>
{% for schueler in not_in_klausur_list %}
<option value="{{ schueler.id }}">{{ schueler.nachname }}, {{ schueler.vorname }}
({% if schueler.stammschule is not none %}{{ schueler.stammschule.name }}, {% endif %}{{ schueler.id }})
</option>
{% endfor %}
</select>
</h3>
<div id="add-new-schueler-form">
<p>
Bevor Sie eine(n) neue(n) Schüler(in) hinzufügen, überprüfen Sie bitte,
ob diese(r) nicht bereits in der obigen Auswahl vorhanden ist.<br>
<b>Tipp:</b> In den meisten Browsern können Sie bei geöffneter Auswahl
den Nachnamen eingeben, um nach einem/einer Schüler(in) zu suchen.
</p>
<div class="table-aligned">
<div>
<div><label for="new-schueler-nachname-input">Nachname:</label></div>
<div><input type="text" name="new-schueler-nachname" id="new-schueler-nachname-input"></div>
</div>
<div>
<div><label for="new-schueler-nachname-input">Vorname:</label></div>
<div><input type="text" name="new-schueler-vorname" id="new-schueler-vorname-input"></div>
</div>
<div>
<div><label for="new-schueler-stammschule-select">Stammschule:</label></div>
<div>
<select name="new-schueler-stammschule" id="new-schueler-stammschule-select">
<option value="" selected>(kein(e) Koop-Schüler(in))</option>
{% for ks in Koopschule.query.all() %}
<option value="{{ ks.kuerzel }}">{{ ks.name }}</option>
{% endfor %}
</select>
</div>
</div>
</div>
</div>
<fieldset>
<label><input type="radio" name="add-to" value="klausur">Hinzufügen zu dieser Klausur</label><br>
<label><input type="radio" name="add-to" value="kurs" checked>Hinzufügen zu allen Klausuren dieses Kurses</label>
</fieldset>
<p><input type="submit" value="Hinzufügen"></p>
</form>
{% if lehrer_can_access %}
<hr>
<h3>Erweiterte Einstellungen</h3>
<form method="post">
<input type="hidden" name="action" value="edit-advanced">
<div class="table-aligned">
<div>
<div><label for="new-lehrer-select">Kurslehrer(in):</label></div>
<div>
<select name="new-lehrer" id="new-lehrer-select">
{% for l in Lehrer.query.order_by(Lehrer.kuerzel).all() %}
<option value="{{ l.id }}" {% if l == klausur.lehrer %}selected{% endif %}>{{ l.kuerzel }}</option>
{% endfor %}
</select>
</div>
</div>
<div>
<div><label for="new-date-input">Klausurdatum:</label></div>
<div>
<input type="date" name="new-date" id="new-date-input"
value="{{ klausur.date.strftime('%Y-%m-%d') }}" required>
</div>
</div>
<div>
<div>Klausurzeitraum:</div>
<div>
<input type="number" name="new-startperiod" id="new-startperiod-input" class="small" min="0"
max="2147483647" value="{{ klausur.startperiod }}" required>{#
#}. bis
<input type="number" name="new-endperiod" id="new-endperiod-input" class="small" min="0" max="2147483647"
value="{{ klausur.endperiod }}" required>{#
#}. Stunde
</div>
</div>
</div>
<p><input type="submit" value="Speichern"></p>
</form>
<form method="post">
<input type="hidden" name="action" value="delete">
<p>
<input type="submit" value="Diese Klausur löschen"
onclick="return confirm('Soll diese Klausur wirklich gelöscht werden?')">
</p>
</form>
{% endif %}
{% endif %}
{% endblock %}
+91
View File
@@ -0,0 +1,91 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/klausuren/mine.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Meine Klausuren{% endblock %}
{% block header %}Meine Klausuren{% endblock %}
{# klausuren_anstehend #}
{# klausuren_vergangen #}
{% block content %}
<h3>vergangen:</h3>
{% if klausuren_vergangen|length == 0 %}
<p>keine</p>
{% else %}
<table>
<thead>
<tr>
<th>Datum</th>
<th>Stufe</th>
<th>Kurs</th>
<th>Zeitraum</th>
<th>bearbeitet</th>
</tr>
</thead>
<tbody>
{% for kv in klausuren_vergangen %}
<tr class="clickable" tabindex="0" data-href="{{ url_for('klausuren.edit', klausur_id=kv.id) }}">
<td>{{ kv.date_formatted() }}</td>
<td>{{ kv.stufe.name }}</td>
<td>{{ kv.kursname }}</td>
<td>{{ zeitraum(kv) }} Std.</td>
{% if kv.edited %}
<td class="positive-status">ja</td>
{% else %}
<td class="negative-status">nein</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<h3>anstehend:</h3>
{% if klausuren_anstehend|length == 0 %}
<p>keine</p>
{% else %}
<table>
<thead>
<tr>
<th>Datum</th>
<th>Stufe</th>
<th>Kurs</th>
<th>Zeitraum</th>
</tr>
</thead>
<tbody>
{% for ka in klausuren_anstehend %}
<tr class="clickable" tabindex="0" data-href="{{ url_for('klausuren.edit', klausur_id=ka.id) }}">
<td>{{ ka.date_formatted() }}</td>
<td>{{ ka.stufe.name }}</td>
<td>{{ ka.kursname }}</td>
<td>{{ zeitraum(ka) }} Std.</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endblock %}
+113
View File
@@ -0,0 +1,113 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/klausuren/stufe.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Klausuren {{ stufe.name }}{% endblock %}
{% block header %}Klausuren {{ stufe.name }}{% endblock %}
{# stufe #}
{# dates_anstehend #}
{# dates_vergangen #}
{% set lehrer_can_access = g.lehrer is not none and g.lehrer.can_access(stufe) %}
{% set klausur_count = dates_anstehend | length + dates_vergangen | length %}
{% set beratungslehrer_list = Lehrer.query.filter_by(beraet=stufe).all() %}
{% block content %}
<p class="description">
Beratungslehrer(innen):
{% if beratungslehrer_list|length == 0 %}
keine
{% else %}
{% for l in beratungslehrer_list %}
{{ l.kuerzel }}{% if l.email is not none %} &lt;<a href="mailto:{{ l.email }}">{{ l.email }}</a>&gt;{% endif %}<!--
-->{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
</p>
{% if lehrer_can_access %}
<p><a href="{{ url_for('klausuren.add', stufe_name=stufe.name) }}" data-icon="&#xf0fe;">Klausur hinzufügen</a></p>
{% endif %}
{% if klausur_count != 0 %}
<p><a href="#heute" data-icon="&#xf103;">zu heute springen</a></p>
{% endif %}
{% if klausur_count == 0 %}
<p>keine</p>
{% else %}
{% for dates_list in (dates_anstehend, dates_vergangen) %}
{% if loop.index0 == 1 %}
<div id="heute" class="labeled-hr" data-icon="&#xf073;">heute ({{ util.format_date(datetime.now()) }})</div>
{% endif %}
{% for date in dates_list %}
{% set date_klausur_list = Klausur.query.filter_by(stufe=stufe, date=date).all() %}
{% set date_iso = date.strftime('%Y-%m-%d') %}
<h3>
<span>
{{ util.format_date(date) }}:
<a class="scroll-anchor" name="{{ date_iso }}" href="#{{ date_iso }}"></a>
</span>
</h3>
<table>
<thead>
<tr>
<th>Lehrer(in)</th>
<th>Kurs</th>
<th>Zeitraum</th>
{% if lehrer_can_access %}
<th>bearbeitet</th>
<th>Bemerkung</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for k in date_klausur_list %}
<tr {% if lehrer_can_access %} class="clickable" tabindex="0"
data-href="{{ url_for('klausuren.edit', klausur_id=k.id) }}" {% endif %}>
<td>{{ k.lehrer.kuerzel }}</td>
<td>{{ k.kursname }}</td>
<td>{{ zeitraum(k) }} Std.</td>
{% if lehrer_can_access %}
{% if k.edited %}
<td class="positive-status">ja</td>
{% else %}
<td class="negative-status">nein</td>
{% endif %}
{% if k.annotation is not none %}
<td class="description">{{ k.annotation }}</td>
{% else %}
<td class="detail">keine</td>
{% endif %}
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
{% endfor %}
{% endfor %}
{% endif %}
{% endblock %}
@@ -0,0 +1,94 @@
{% extends 'base.html.j2' %}
{#
NateMan Nachschreibtermin-Manager
templates/schueler/versaeumnisse.html.j2
Copyright © 2020 Niklas Elsbrock
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
#}
{% block title %}Versäumnisse{% endblock %}
{% block header %}Versäumnisse{% endblock %}
{#
versaeumt_dict: Dictinonary mit jeweils eimem Tupel aus zwei Listen aller nicht nachgeschriebenen bzw.
nachgeschriebenen versäumten Klausurteilnahmen pro Stufe, auf die der angemeldete Lehrer Zugriff hat
#}
{% block content %}
<form method="post">
{% for stufe, versaeumt_listen in versaeumt_dict.items() %}
<h3>{{ stufe.name }}</h3>
{% for versaeumt_list in versaeumt_listen %}
<h4>
{% if loop.first %}
noch nicht nachgeschrieben:
{% else %}
bereits nachgeschrieben:
{% endif %}
</h4>
{% if versaeumt_list|length == 0 %}
<p>keine</p>
{% else %}
<table>
<thead>
<tr>
<th>Schüler(in)</th>
<th>Klausurdatum</th>
<th>Kurs</th>
<th>Lehrer</th>
<th>Länge</th>
<th>Bemerkung</th>
<th>attestiert</th>
<th>nachgeschrieben</th>
</tr>
</thead>
<tbody>
{% for kt in versaeumt_list %}
<tr class="clickable" tabindex="0" data-href="{{ url_for('klausuren.edit', klausur_id=kt.klausur.id) }}">
<td>{{ kt.schueler.nachname }}, {{ kt.schueler.vorname }}
<span class="detail">({% if kt.schueler.stammschule is not none %}{{ kt.schueler.stammschule.name }},
{% endif %}{{ kt.schueler.id }})</span>
</td>
<td>{{ kt.klausur.date_formatted() }}</td>
<td>{{ kt.klausur.kursname }}</td>
<td>{{ kt.klausur.lehrer.kuerzel }}</td>
<td>{{ kt.klausur.laenge }}</td>
{% if kt.klausur.annotation is not none %}
<td class="description">{{ kt.klausur.annotation }}</td>
{% else %}
<td class="detail">keine</td>
{% endif %}
<td><input type="checkbox" name="a_{{ kt.klausur.id }}:{{ kt.schueler.id }}"
onclick="event.stopPropagation()" {% if kt.attestiert %}checked{% endif %}></td>
<td><input type="checkbox" name="n_{{ kt.klausur.id }}:{{ kt.schueler.id }}"
onclick="event.stopPropagation()" {% if kt.nachgeschrieben %}checked{% endif %}></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
{% endfor %}
<hr>
{% endfor %}
<p><input type="submit" value="Speichern"></p>
</form>
{% endblock %}
+104
View File
@@ -0,0 +1,104 @@
# NateMan Nachschreibtermin-Manager
# util.py
# Copyright © 2020 Niklas Elsbrock
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
Enthält nützliche, von NateMan unabhängige Funktionen.
"""
import random
import re
from datetime import date
EMAIL_ADDRESS_REGEX = re.compile(r"^[a-zA-Z0-9!#$%&*+/=?^_`{|}~](\.?[a-zA-Z0-9!#$%&*+/=?^_`{|}~])*"
r"@[a-zA-Z0-9-](\.?[a-zA-Z0-9-])*$")
_RUASS_TRANSLATION = {ord("ä"): "ae", ord("Ä"): "Ae",
ord("ö"): "oe", ord("Ö"): "Oe",
ord("ü"): "ue", ord("Ü"): "Ue",
ord("ß"): "ss", ord(""): "Ss"}
""" Übersetzungstabelle für replace_umlauts_and_sharp_s """
def email_address_safe(s: str) -> str:
"""
Ersetzt die Buchstaben ä, ö, ü und ß (als Klein- oder Großbuchstabe) im String s durch die entsprechende
Zeichenfolge ohne Umlaute bzw. Eszett und wandelt alle Buchstaben in Kleinbuchstaben um.
von Niklas Elsbrock.
"""
return s.translate({
ord("ä"): "ae", ord("Ä"): "Ae",
ord("ö"): "oe", ord("Ö"): "Oe",
ord("ü"): "ue", ord("Ü"): "Ue",
ord("ß"): "ss", ord(""): "Ss"
}).lower()
_URI_SAFE_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
""" Zeichensatz für :func:`random_uri_safe_string` """
_SYSTEM_RANDOM = random.SystemRandom()
def random_uri_safe_string(length: int) -> str:
"""
Generiert einen zufälligen String der Länge ``length`` aus URI-freundlichen Zeichen
(Buchstaben, Bindestrich, Unterstrich).
von Niklas Elsbrock.
:param length: Länge des zu generierenden Strings
:return: generierter String
"""
return "".join(_SYSTEM_RANDOM.choice(_URI_SAFE_CHARS) for _ in range(length))
def validate_bcrypt_password(password: str) -> bool:
"""
Überprüft, ob der übergebene String ``password`` als Passwort verwendet werden kann
(d.h. ob das Passwort höchstens 72 Bytes groß ist).
von Niklas Elsbrock.
:param password: zu validierender String
:return: ``True`` falls ja, ``False`` falls nein
"""
return len(password.encode("utf-8")) <= 72
def format_date(date_: date) -> str:
"""
Formatiert ein Datumsobjekt nach dem deutschen Datumsformat, inklusive Wochentagkürzel (WW, DD.MM.YYYY).
von Niklas Elsbrock.
:param date_: zu formatierendes Datum
:return: formatiertes Datum als String
"""
return date_.strftime("%a, %d.%m.%Y")
def is_integer_string(s: str) -> bool:
"""
Überprüft, ob der String ``s`` in einen Integer umgewandelt werden kann
:param s: zu überprüfender String
:return: ``True`` falls ja, ``False`` falls nein
"""
try:
int(s)
except ValueError:
return False
else:
return True