Compare commits
10 Commits
v0.1
...
56ec2cfb15
| Author | SHA1 | Date | |
|---|---|---|---|
| 56ec2cfb15 | |||
| 4260ca0e92 | |||
| 3b8cf7e53d | |||
| b8c2bea4ae | |||
| 937bf9787c | |||
| c77f6017d4 | |||
| 8ddd7a972c | |||
| 1c971975dd | |||
| 2d964e0a29 | |||
| 4f9fb5ac4d |
@ -1,3 +1,6 @@
|
|||||||
{
|
{
|
||||||
|
"TINF22B3": [
|
||||||
|
"raplaTINF22B3.ical",
|
||||||
|
"https://rapla.dhbw-karlsruhe.de/rapla?page=ical&user=vollmer&file=tinf22b3"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
@ -119,9 +119,9 @@ def getResults(token, cookie: str, resl: str):
|
|||||||
vorlist = []
|
vorlist = []
|
||||||
for row in vorl:
|
for row in vorl:
|
||||||
cols = row.find_all("td")
|
cols = row.find_all("td")
|
||||||
col = [e.text.strip() for e in cols]
|
col = [[e.text.strip()] for e in cols]
|
||||||
if len(col) != 0:
|
if len(col) != 0:
|
||||||
if len(col[4]) == 0:
|
if len(col[4][0]) == 0:
|
||||||
col[2] = getPruefung(row.find("a")["href"])
|
col[2] = getPruefung(row.find("a")["href"])
|
||||||
vorlist += [col[1:4]]
|
vorlist += [col[1:4]]
|
||||||
return vorlist
|
return vorlist
|
||||||
@ -132,20 +132,23 @@ def getPruefung(url):
|
|||||||
Ermittelt Noten "geschachtelter" Prüfungen, die nicht auf der Hauptseite angezeigt werden.
|
Ermittelt Noten "geschachtelter" Prüfungen, die nicht auf der Hauptseite angezeigt werden.
|
||||||
TODO: Namen der spezifischen Prüfungen auch zurückgeben, um Zusammensetzung zu spezifizieren.
|
TODO: Namen der spezifischen Prüfungen auch zurückgeben, um Zusammensetzung zu spezifizieren.
|
||||||
:param url:
|
:param url:
|
||||||
:return:
|
:return list:
|
||||||
"""
|
"""
|
||||||
response = requests.request("GET", "https://dualis.dhbw.de" + url, headers=headers, data={})
|
response = requests.request("GET", "https://dualis.dhbw.de" + url, headers=headers, data={})
|
||||||
html = BeautifulSoup(response.content.decode("utf-8"), 'lxml')
|
html = BeautifulSoup(response.content.decode("utf-8"), 'lxml')
|
||||||
table = html.find('table')
|
table = html.find('table')
|
||||||
pruefung = table.find_all("tr")
|
pruefung = table.find_all("tr")
|
||||||
ret = " "
|
ret = []
|
||||||
for row in pruefung:
|
for row in pruefung:
|
||||||
cols = row.find_all("td")
|
cols = row.find_all("td")
|
||||||
col = [e.text.strip() for e in cols]
|
col = [e.text.strip() for e in cols]
|
||||||
if len(col) == 6:
|
if len(col) == 6 and len(col[3]) <= 13:
|
||||||
ret = col[3][:3]
|
if len(col[3]) != 0:
|
||||||
if ret[1] != ",":
|
ret += [col[0] + ": " + col[3][:3]]
|
||||||
ret = "noch nicht gesetzt"
|
if ret[-1][0] == ':':
|
||||||
|
ret[-1] = "Gesamt" + ret[-1]
|
||||||
|
if len(ret) == 0:
|
||||||
|
ret = ["Noch nicht gesetzt"]
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,6 @@ def getMealsFromAPI(day: str, dbentry: bool = False):
|
|||||||
response = response.content
|
response = response.content
|
||||||
jres = json.loads(response.decode("utf-8"))
|
jres = json.loads(response.decode("utf-8"))
|
||||||
essen = []
|
essen = []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
num = len(jres["data"][0]["lines"])
|
num = len(jres["data"][0]["lines"])
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
@ -67,7 +66,7 @@ def getMealsFromAPI(day: str, dbentry: bool = False):
|
|||||||
|
|
||||||
essen += [name]
|
essen += [name]
|
||||||
if dbentry:
|
if dbentry:
|
||||||
mid = int(time.time()*1000) % 100000
|
mid = int(time.time() * 1000) % 100000
|
||||||
neu = Meals(date=day, name=name, id=mid, vegan=vegan, vegetarian=veget, schwein=schwein)
|
neu = Meals(date=day, name=name, id=mid, vegan=vegan, vegetarian=veget, schwein=schwein)
|
||||||
db.session.add(neu)
|
db.session.add(neu)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
@ -99,11 +98,15 @@ def formatDay(day: datetime):
|
|||||||
:param day:
|
:param day:
|
||||||
:return str:
|
:return str:
|
||||||
"""
|
"""
|
||||||
|
if day.month < 10:
|
||||||
|
mon = "0" + str(day.month)
|
||||||
|
else:
|
||||||
|
mon = str(day.month)
|
||||||
if day.day < 10:
|
if day.day < 10:
|
||||||
tag = "0" + str(day.day)
|
tag = "0" + str(day.day)
|
||||||
else:
|
else:
|
||||||
tag = str(day.day)
|
tag = str(day.day)
|
||||||
day = str(day.year) + "-" + str(day.month) + "-" + tag
|
day = str(day.year) + "-" + mon + "-" + tag
|
||||||
return day
|
return day
|
||||||
|
|
||||||
|
|
||||||
@ -128,7 +131,7 @@ def refreshMeals():
|
|||||||
dbnames = []
|
dbnames = []
|
||||||
for m in dbmeals:
|
for m in dbmeals:
|
||||||
dbnames += [m.name]
|
dbnames += [m.name]
|
||||||
if set (dbnames) != set(apinames) and nomeal not in apinames:
|
if set(dbnames) != set(apinames) and nomeal not in apinames:
|
||||||
for n in dbnames:
|
for n in dbnames:
|
||||||
db.session.delete(Meals.query.filter_by(date=i, name=n).first())
|
db.session.delete(Meals.query.filter_by(date=i, name=n).first())
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|||||||
@ -93,13 +93,13 @@ def getRaplas():
|
|||||||
return sorted(kursl), sorted(filel), sorted(urll)
|
return sorted(kursl), sorted(filel), sorted(urll)
|
||||||
|
|
||||||
|
|
||||||
@scheduler.task("interval", id="refreshRapla", minutes=30)
|
@scheduler.task("interval", id="refreshRapla", minutes=5)
|
||||||
def refreshRapla():
|
def refreshRapla():
|
||||||
"""
|
"""
|
||||||
Aktualisiert alle 30 Minuten alle gespeicherten Raplas.
|
Aktualisiert alle 5 Minuten alle gespeicherten Raplas.
|
||||||
"""
|
"""
|
||||||
filel = getRaplas()[1]
|
filel = getRaplas()[1]
|
||||||
urll = getRaplas()[2]
|
urll = getRaplas()[2]
|
||||||
for i in range(len(filel)):
|
for i in range(len(filel)):
|
||||||
urlretrieve(urll[i], "calendars/"+filel[i])
|
print("Update Rapla: " + filel[i][:-5])
|
||||||
print("Update die Kalender...")
|
urlretrieve(urll[i], "calendars/" + filel[i])
|
||||||
6
init.py
6
init.py
@ -1,7 +1,7 @@
|
|||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_login import LoginManager, UserMixin
|
from flask_login import LoginManager, UserMixin
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
from talisman import Talisman
|
from flask_talisman import Talisman
|
||||||
from get_mysql import get_mysql
|
from get_mysql import get_mysql
|
||||||
import atexit
|
import atexit
|
||||||
from flask_apscheduler import APScheduler
|
from flask_apscheduler import APScheduler
|
||||||
@ -71,7 +71,9 @@ class Meals(db.Model):
|
|||||||
|
|
||||||
scheduler = APScheduler()
|
scheduler = APScheduler()
|
||||||
app = create()
|
app = create()
|
||||||
Talisman(app)
|
def_src = ["*.paulmartin.cloud", '\'self\'']
|
||||||
|
Talisman(app, content_security_policy={"default-src": def_src, "script-src": def_src # + ["'unsafe-inline'"]
|
||||||
|
})
|
||||||
scheduler.init_app(app)
|
scheduler.init_app(app)
|
||||||
scheduler.start()
|
scheduler.start()
|
||||||
scheduler.api_enabled = True
|
scheduler.api_enabled = True
|
||||||
|
|||||||
14
routing.py
14
routing.py
@ -7,6 +7,7 @@ from werkzeug.security import generate_password_hash, check_password_hash
|
|||||||
import hashlib
|
import hashlib
|
||||||
import datetime
|
import datetime
|
||||||
import time
|
import time
|
||||||
|
import random
|
||||||
|
|
||||||
import fetchDUALIS
|
import fetchDUALIS
|
||||||
import fetchRAPLA
|
import fetchRAPLA
|
||||||
@ -36,7 +37,7 @@ def welcome():
|
|||||||
return redirect(url_for("getKurs", next=url_for(request.endpoint)))
|
return redirect(url_for("getKurs", next=url_for(request.endpoint)))
|
||||||
sel = request.args.get("sel")
|
sel = request.args.get("sel")
|
||||||
if not sel:
|
if not sel:
|
||||||
sel="theorie"
|
sel = "theorie"
|
||||||
kurs = current_user.kurs
|
kurs = current_user.kurs
|
||||||
name = current_user.name
|
name = current_user.name
|
||||||
if sel == "theorie":
|
if sel == "theorie":
|
||||||
@ -118,7 +119,7 @@ def displayPlan(kurs):
|
|||||||
samstag = False
|
samstag = False
|
||||||
events = getWeek(week, plan, samstag)
|
events = getWeek(week, plan, samstag)
|
||||||
return render_template("plan-anon.html", events=events[0], eventdays=events[1], kurs=kurs,
|
return render_template("plan-anon.html", events=events[0], eventdays=events[1], kurs=kurs,
|
||||||
prev=str(events[2])[:10], next=str(events[3])[:10], mon=events[4])
|
prev=str(events[2])[:10], next=str(events[3])[:10], mon=events[4], praxis="hidden")
|
||||||
else:
|
else:
|
||||||
return redirect(url_for("login"))
|
return redirect(url_for("login"))
|
||||||
|
|
||||||
@ -150,6 +151,9 @@ def getKurs():
|
|||||||
if not current_user.kurs:
|
if not current_user.kurs:
|
||||||
kurs = fetchDUALIS.getKurs(d.token, cookie)
|
kurs = fetchDUALIS.getKurs(d.token, cookie)
|
||||||
if kurs != 0:
|
if kurs != 0:
|
||||||
|
if not fetchRAPLA.getIcal(kurs):
|
||||||
|
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden",
|
||||||
|
file=False)
|
||||||
current_user.kurs = kurs
|
current_user.kurs = kurs
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
else:
|
else:
|
||||||
@ -161,7 +165,7 @@ def getKurs():
|
|||||||
else:
|
else:
|
||||||
e = True
|
e = True
|
||||||
kurs = ""
|
kurs = ""
|
||||||
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden")
|
return render_template('kurs.html', detected=(kurs, e), s="s", theorie="hidden", praxis="hidden", file=True)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/set-up/semester")
|
@app.route("/set-up/semester")
|
||||||
@ -174,7 +178,7 @@ def getSemester():
|
|||||||
t = Dualis.query.filter_by(uid=current_user.id).first().token
|
t = Dualis.query.filter_by(uid=current_user.id).first().token
|
||||||
c = request.cookies.get("cnsc")
|
c = request.cookies.get("cnsc")
|
||||||
|
|
||||||
return render_template("semester.html", semester=fetchDUALIS.getSem(t, c), s="s", theorie="hidden", praxis="hidden")
|
return render_template("semester.html", semester=fetchDUALIS.getSem(t, c), s="s", theorie="hidden", praxis="hidden")
|
||||||
|
|
||||||
|
|
||||||
@app.route("/set-up/semester", methods=["POST"])
|
@app.route("/set-up/semester", methods=["POST"])
|
||||||
@ -201,7 +205,7 @@ def chooseRaplas():
|
|||||||
:return HTML:
|
:return HTML:
|
||||||
"""
|
"""
|
||||||
r = getRaplas()
|
r = getRaplas()
|
||||||
return render_template("rapla.html", raplas=r, s="s", theorie="hidden", praxis="hidden")
|
return render_template("rapla.html", raplas=r, s="s", theorie="hidden", praxis="hidden")
|
||||||
|
|
||||||
|
|
||||||
@app.route("/set-up/rapla", methods=["POST"])
|
@app.route("/set-up/rapla", methods=["POST"])
|
||||||
|
|||||||
@ -32,7 +32,7 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userbuttons {
|
.userbuttons {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
@ -146,6 +146,10 @@ option {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event:hover {
|
||||||
|
transform: scale(102%);
|
||||||
|
}
|
||||||
|
|
||||||
.space,
|
.space,
|
||||||
.date {
|
.date {
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@ -233,6 +237,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -241,6 +246,25 @@ nav li .bottom {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.start-0100 {
|
.start-0100 {
|
||||||
grid-row-start: 1;
|
grid-row-start: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
{"version":3,"sourceRoot":"","sources":["cal.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAMF;EACE;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;;;AAKF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAKF;EACI;EACA;;;AAIJ;EACI;EACA;EAC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A;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAKA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA","file":"cal.css"}
|
{"version":3,"sourceRoot":"","sources":["cal.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;;;AAMF;EACE;EACA;EACA;EACA;;;AAGF;AAAA;EAEE;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;AAAA;EAEE;;;AAKF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAKF;EACI;EACA;;;AAIJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;;;AAIJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACE;;;AAQF;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAKA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;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;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA;;;AAEA;EACA","file":"cal.css"}
|
||||||
@ -32,7 +32,7 @@ select {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.userbuttons {
|
.userbuttons {
|
||||||
width: 90%;
|
width: 95%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
@ -148,6 +148,10 @@ option {
|
|||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.event:hover{
|
||||||
|
transform: scale(102%);
|
||||||
|
}
|
||||||
|
|
||||||
.space,
|
.space,
|
||||||
.date {
|
.date {
|
||||||
height: 100px
|
height: 100px
|
||||||
@ -241,6 +245,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -249,6 +254,24 @@ nav li .bottom {
|
|||||||
width: 200px;
|
width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
// Place on Timeline
|
// Place on Timeline
|
||||||
|
|
||||||
|
|||||||
7
static/dropdown.js
Normal file
7
static/dropdown.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
|
const dropdown = document.getElementById("dropdown");
|
||||||
|
dropdown.addEventListener("change", function() {
|
||||||
|
dropdown.submit();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
@ -67,6 +67,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -123,6 +124,29 @@ nav li .bottom {
|
|||||||
width: 50px;
|
width: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 80%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIJ;EACI;EACA;;;AAGJ;AACA;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACH;;;AAKD;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA","file":"style.css"}
|
{"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAIJ;EACI;EACA;;;AAGJ;AACA;EACI;EACA;EACA;;;AAGJ;EACI;EACA;EACA;EACA;EACA;;;AAGJ;EACI;;;AAGJ;EACI;;;AAGJ;EACI;EACA;EACA;EACH;;;AAGD;EACI;;;AAGJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGJ;EACI;EACA;;;AAGJ;EACE;;;AAGF;EACI;EACA;;;AAGJ;EACI;;;AAGJ;EACI;EACA","file":"style.css"}
|
||||||
@ -67,6 +67,7 @@ nav li a {
|
|||||||
|
|
||||||
nav li a:hover {
|
nav li a:hover {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
nav li .bottom {
|
nav li .bottom {
|
||||||
@ -122,9 +123,30 @@ nav li .bottom {
|
|||||||
top: 10px;
|
top: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
width:50px;
|
width:50px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space {
|
||||||
|
width: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footerdiv {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
justify-content: right;
|
||||||
|
bottom: 10px;
|
||||||
|
right: 10px;
|
||||||
|
font-size: 80%;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer {
|
||||||
|
color: white;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.footer:hover {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
width: 150px;
|
width: 150px;
|
||||||
@ -138,4 +160,4 @@ input[type=url], input[type=email], input[type=password] {
|
|||||||
select {
|
select {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
height: 50px
|
height: 50px
|
||||||
}
|
}
|
||||||
@ -3,7 +3,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>DualHub</title>
|
<title>DualHub</title>
|
||||||
<link rel="stylesheet" type="text/css" href={{ url_for("static", filename="style.css") }}>
|
<link rel="stylesheet" type="text/css" href={{ url_for("static", filename="style.css") }}>
|
||||||
|
<meta http-equiv="refresh" content="510">
|
||||||
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
||||||
|
{% block head %}
|
||||||
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
|
|||||||
@ -1,16 +1,20 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if not detected[1] %}
|
{% if not detected[1] %}
|
||||||
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Falls er nicht stimmt, kannst du ihn unten auswählen.</h1>
|
{% if file %}
|
||||||
{% if not request.args.get("next") %}
|
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Falls er nicht stimmt, kannst du ihn unten auswählen.</h1>
|
||||||
<form action={{ url_for("getSemester") }}>
|
{% if not request.args.get("next") %}
|
||||||
|
<form action={{ url_for("getSemester") }}>
|
||||||
|
{% else %}
|
||||||
|
<form action={{ request.args.get("next") }}>
|
||||||
|
{% endif %}
|
||||||
|
<input type="submit" value="Der Kurs stimmt!">
|
||||||
|
</form>
|
||||||
{% else %}
|
{% else %}
|
||||||
<form action={{ request.args.get("next") }}>
|
<h1>Wir haben {{ detected[0] }} als deinen Kurs ermittelt. Für ihn ist aber noch kein Rapla hinterlegt.</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input type="submit" value="Der Kurs stimmt!">
|
|
||||||
</form>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<h1>Dein Kurs konnte leider nicht ermittelt werden. Klicke den Button, um direkt zur Auswahl zu kommen.</h1>
|
<h1>Dein Kurs konnte leider nicht ermittelt werden. Klicke den Button, um zur Auswahl zu kommen.</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<form action={{ url_for("chooseRaplas", next=request.args.get("next")) }}>
|
<form action={{ url_for("chooseRaplas", next=request.args.get("next")) }}>
|
||||||
<input type="submit" value="Manuell auswählen!">
|
<input type="submit" value="Manuell auswählen!">
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<script type="text/javascript" src="{{ url_for("static", filename="dropdown.js") }}"></script>
|
||||||
|
<meta http-equiv="Refresh" content="600">
|
||||||
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% for i in range (semester|length) %}
|
{% for i in range (semester|length) %}
|
||||||
{% if semester[i][1]==sel %}
|
{% if semester[i][1]==sel %}
|
||||||
@ -8,17 +12,27 @@
|
|||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
{% for i in noten %}
|
{% for i in noten %}
|
||||||
<h2>{{ i[0] }}: {{ i[1].capitalize() }} (Credits: {{ i[2] }})</h2>
|
{% if i[1]|length == 1 %}
|
||||||
|
{% if i[1][0][0].isnumeric() or i[1][0][-1].isalpha()%}
|
||||||
|
<h2>{{ i[0][0] }}: {{ i[1][0] }} (Credits: {{ i[2][0] }})</h2>
|
||||||
|
{% else %}
|
||||||
|
<h2>{{ i[0][0] }}: {{ i[1][0][-3:] }} (Credits: {{ i[2][0] }})</h2>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<h2>{{ i[0][0] }} (Credits: {{ i[2][0] }}):</h2>
|
||||||
|
{% for e in i[1] %}
|
||||||
|
<h2>      {{ e }}</h2>
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<form method="post" action={{ url_for ("setSemester", next=url_for("displayNoten")) }}>
|
<form id= "dropdown" method="post" action={{ url_for ("setSemester", next=url_for("displayNoten")) }}>
|
||||||
<label for="sem">Semester wählen! </label>
|
<label for="sem">Semester wählen! </label>
|
||||||
<select name="sem" id="sem">
|
<select name="sem" id="sem">
|
||||||
{% for i in range (semester|length) %}
|
{% for i in range (semester|length) %}
|
||||||
<option value= {{ semester [i] [1] }} {% if semester[i][1]==sel %} selected {% endif %}>{{ semester [i] [0] }} </option>
|
<option value= {{ semester [i] [1] }} {% if semester[i][1]==sel %} selected {% endif %}>{{ semester [i] [0] }} </option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Semester setzen!">
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@ -4,6 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Vorlesungsplan</title>
|
<title>Vorlesungsplan</title>
|
||||||
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='cal.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='cal.css') }}">
|
||||||
|
<script async src="https://analytics.paulmartin.cloud/script.js" data-website-id="459fa66e-e255-4393-8e89-ead8b1572d0d"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<nav>
|
<nav>
|
||||||
|
|||||||
@ -1,7 +1,10 @@
|
|||||||
{% extends "index.html" %}
|
{% extends "index.html" %}
|
||||||
|
{% block head %}
|
||||||
|
<script type="text/javascript" src="{{ url_for("static", filename="dropdown.js") }}"></script>
|
||||||
|
{% endblock %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<h1>Bitte wähle aus der unten stehenden Liste das Semester, dessen Noten du sehen möchtest.</h1>
|
<h1>Bitte wähle aus der unten stehenden Liste das Semester, dessen Noten du sehen möchtest.</h1>
|
||||||
<form method="post" action={{ url_for ("setSemester", next=request.args.get("next")) }}>
|
<form id="dropdown" method="post" action={{ url_for ("setSemester", next=request.args.get("next")) }}>
|
||||||
<label for="sem">Semester wählen! </label>
|
<label for="sem">Semester wählen! </label>
|
||||||
<select name="sem" id="sem">
|
<select name="sem" id="sem">
|
||||||
<option value = "none" selected disabled hidden></option>
|
<option value = "none" selected disabled hidden></option>
|
||||||
@ -9,6 +12,5 @@
|
|||||||
<option value= {{ semester [i] [1] }}>{{ semester [i] [0] }} </option>
|
<option value= {{ semester [i] [1] }}>{{ semester [i] [0] }} </option>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" value="Semester setzen!">
|
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user