diff --git a/advlabdb/routes.py b/advlabdb/routes.py
index 338220d..929588f 100644
--- a/advlabdb/routes.py
+++ b/advlabdb/routes.py
@@ -1,6 +1,7 @@
from advlabdb import app
from flask import render_template, request, url_for
from advlabdb.utils import *
+from advlabdb.models import *
@app.route("/")
def index():
@@ -9,8 +10,54 @@ def index():
@app.route("/students")
def students():
+ parts = Semester.query.first().parts
+ tables = []
+ tablesLabels = []
+ for part in parts:
+ tablesLabels.append("Part" + part.label + ":")
+
+ table = ''
+ table += th("Student number")
+ table += th("First name")
+ table += th("Last name")
+ table += th("Email")
+ table += th("Bachelor thesis")
+ table += th("BT WG")
+ table += th("Note")
+ table += th("Parts")
+ table += th("Final part mark")
+ table += th("GN")
+ table += th("Experiemt marks")
+ table += '
\n
\n'
+
+ for partStudent in part.part_students:
+ student = partStudent.student
+
+ table += ''
+
+ table += td(student.student_number)
+ table += td(student.first_name)
+ table += td(student.last_name)
+ table += td(student.email)
+ table += td(student.bachelor_thesis)
+ table += td(student.bachelor_thesis_work_group)
+ table += td(student.note)
+
+ table += td([ps.part for ps in student.part_students])
+
+ table += td(partStudent.final_part_mark)
+ table += td(partStudent.group.number)
+
+ table += td(partStudent.experiment_marks)
+
+ table += '
\n'
+
+ table += ''
+ tables.append(table)
+
page = "students"
- return render_template(page + ".html", navbarItems=navbarItems(page))
+ return render_template(page + ".html", navbarItems=navbarItems(page),
+ tables=tables, tablesLabels=tablesLabels)
@app.route("/assistants")
def assistants():
diff --git a/advlabdb/templates/layout.html b/advlabdb/templates/layout.html
index 247d43d..9ff933d 100644
--- a/advlabdb/templates/layout.html
+++ b/advlabdb/templates/layout.html
@@ -7,6 +7,9 @@
+
+
+
{% if title %}
{{title}}
@@ -30,7 +33,17 @@
{% block content %}{% endblock content %}
+
+
+
+
+
+
+
+
+
+