Compare commits

..

6 Commits

Author SHA1 Message Date
Jan
45d2874999 Merge pull request 'More fixes, those are the final texts !!!' (#10) from working into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #10
2024-10-13 15:43:46 +02:00
Jan
728c282a3d try to remove database via git 2024-10-13 15:42:25 +02:00
Jan
23e6ee55c6 multiple choice bug fixed 2024-10-13 15:29:30 +02:00
Jan
52db4cc0fb fixed small bug 2024-10-13 15:22:18 +02:00
Jan
2702ce3c3c password is checked via hash now 2024-10-13 15:18:14 +02:00
Jan
ab27d70946 More fixes, those are the final texts !!! 2024-10-07 14:05:43 +02:00
6 changed files with 19 additions and 18 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@
*.pyc *.pyc
__pycache__/ __pycache__/
instance/
uploads/ uploads/
zip_exports/ zip_exports/

View File

@ -15,9 +15,9 @@ from sqlalchemy.orm import DeclarativeBase
import os import os
import csv import csv
from zipfile import ZipFile from zipfile import ZipFile
import hashlib
random_order = True # activate environment: cd C:\...\...\....\...\Code\SLAEForms Testing\.venv\Scripts\
# activate environment: cd C:\Users\Jan\Google Drive\Master Stuff\Code\SLAEForms Testing\.venv\Scripts\
# then this: activate # then this: activate
#SETUP-------------------------------------------------- #SETUP--------------------------------------------------
@ -41,7 +41,7 @@ app.secret_key = b"29fe9e8edd407c5491d4f1c05632d9fa33e26ed8734a3f5e080ebac3772a5
UPLOAD_FOLDER = 'uploads' UPLOAD_FOLDER = 'uploads'
EXPORT_FOLDER = 'exports' EXPORT_FOLDER = 'exports'
PASSWORD = '#1ACGmsjd' PASSWORD = 'd5aff9fc14d1f20f4ccddaa8b4f2c1765228b74ed0b1dfb868bf1064e0d655e2'
CONFIGFILE = 'userstudy1.json' CONFIGFILE = 'userstudy1.json'
# CONFIGFILE = 'test.json' # CONFIGFILE = 'test.json'
# CONFIGFILE = 'default.json' # CONFIGFILE = 'default.json'
@ -191,9 +191,10 @@ def startpage():
case "single_video": case "single_video":
order = list(config[name]["stimuli"]["list"]) # order = list of simuli keys order = list(config[name]["stimuli"]["list"]) # order = list of simuli keys
print("order: ",order) print("order: ",order)
if config[name]["stimuli"]["order"] == "random": if "order" in config[name]["stimuli"]:
random.shuffle(order) #in random order if config[name]["stimuli"]["order"] == "random":
session["block_order"][name] = order random.shuffle(order) #in random order
session["block_order"][name] = order
case "double_video": case "double_video":
order = [] # order = list of stimuli keys order = [] # order = list of stimuli keys
list_1 = list(config[name]["stimuli"]["list_1"]) list_1 = list(config[name]["stimuli"]["list_1"])
@ -622,9 +623,10 @@ def show_tables():
def login(): def login():
if request.method == "POST": if request.method == "POST":
if request.form["password"] == PASSWORD: pwhash = hashlib.sha256(request.form["password"].encode('utf-8')).hexdigest()
if pwhash == PASSWORD:
session["logged_in"] = True session["logged_in"] = True
return redirect("/") return redirect(url_for("all_links"))
return render_template("login.html") return render_template("login.html")

View File

@ -262,7 +262,8 @@ step={{question["step"]}}
{% elif (questions[question]["type"] == "multiplechoice") %} {% elif (questions[question]["type"] == "multiplechoice") %}
<div class="compressWidth"> <div class="compressWidth">
<label> <p>
<div>
{{ questions[question]['text']}} {{ questions[question]['text']}}
{% for point in questions[question]["points"] %} {% for point in questions[question]["points"] %}
@ -272,7 +273,8 @@ step={{question["step"]}}
{{ questions[question]['points'][point]['text']}}</label> {{ questions[question]['points'][point]['text']}}</label>
{% endfor %} {% endfor %}
</label> </div>
</p>
</div> </div>
<div class="spacer" aria-hidden="true" style="height:30px"></div> <div class="spacer" aria-hidden="true" style="height:30px"></div>

View File

@ -48,7 +48,7 @@
gezeigt. gezeigt.
</p> </p>
<p> <p>
Das Laden der Seiten kann manchmal einige Sekunden dauern, bei schlechtem Internet auch länger. Haben sie bitte Geduld. Falls es zu einem Fehler kommt und ein Video nicht geladen wird, versuchen sie die Seite neu zu laden. Das Laden der Seiten kann manchmal einige Sekunden dauern. Falls es zu einem Fehler kommen sollte und ein Video nicht geladen wird, versuchen Sie bitte die Seite neu zu laden.
</p> </p>
<p> <p>
Für jeden Teil der Studie gibt es ein Video, das die Fragestellung und die Antwortmöglichkeiten in Für jeden Teil der Studie gibt es ein Video, das die Fragestellung und die Antwortmöglichkeiten in

View File

@ -21,10 +21,7 @@
<div class="container"> <div class="container">
<video controls> <div style="padding:56.25% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/1017028141?badge=0&amp;autopause=0&amp;player_id=0&amp;app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write" style="position:absolute;top:0;left:0;width:100%;height:100%;" title="0020-simple"></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
<source src="{{ url_for('static', filename='videos/GLEISvariations.mp4') }}" type="video/mp4">
</video>
<form class="formlayout" id="question_form" action="{{ url_for('sendpage') }}" method="post"> <form class="formlayout" id="question_form" action="{{ url_for('sendpage') }}" method="post">

View File

@ -8,9 +8,9 @@
"template": "standard_template.html", "template": "standard_template.html",
"stimuli": { "stimuli": {
"type": "single_video", "type": "single_video",
"order": "random", "order": "",
"list": { "list": {
"video_1": "videos/platzhalter-video.mp4" "video_1": "platzhalter-video.mp4"
}, },
"configuration": { "configuration": {
"embed": "no" "embed": "no"