Compare commits
4 Commits
ab27d70946
...
728c282a3d
Author | SHA1 | Date | |
---|---|---|---|
728c282a3d | |||
23e6ee55c6 | |||
52db4cc0fb | |||
2702ce3c3c |
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,7 +3,7 @@
|
||||
*.pyc
|
||||
__pycache__/
|
||||
|
||||
instance/
|
||||
|
||||
|
||||
uploads/
|
||||
zip_exports/
|
||||
|
@ -15,9 +15,9 @@ from sqlalchemy.orm import DeclarativeBase
|
||||
import os
|
||||
import csv
|
||||
from zipfile import ZipFile
|
||||
import hashlib
|
||||
|
||||
random_order = True
|
||||
# activate environment: cd C:\Users\Jan\Google Drive\Master Stuff\Code\SLAEForms Testing\.venv\Scripts\
|
||||
# activate environment: cd C:\...\...\....\...\Code\SLAEForms Testing\.venv\Scripts\
|
||||
# then this: activate
|
||||
|
||||
#SETUP--------------------------------------------------
|
||||
@ -41,7 +41,7 @@ app.secret_key = b"29fe9e8edd407c5491d4f1c05632d9fa33e26ed8734a3f5e080ebac3772a5
|
||||
|
||||
UPLOAD_FOLDER = 'uploads'
|
||||
EXPORT_FOLDER = 'exports'
|
||||
PASSWORD = '#1ACGmsjd'
|
||||
PASSWORD = 'd5aff9fc14d1f20f4ccddaa8b4f2c1765228b74ed0b1dfb868bf1064e0d655e2'
|
||||
CONFIGFILE = 'userstudy1.json'
|
||||
# CONFIGFILE = 'test.json'
|
||||
# CONFIGFILE = 'default.json'
|
||||
@ -191,9 +191,10 @@ def startpage():
|
||||
case "single_video":
|
||||
order = list(config[name]["stimuli"]["list"]) # order = list of simuli keys
|
||||
print("order: ",order)
|
||||
if config[name]["stimuli"]["order"] == "random":
|
||||
random.shuffle(order) #in random order
|
||||
session["block_order"][name] = order
|
||||
if "order" in config[name]["stimuli"]:
|
||||
if config[name]["stimuli"]["order"] == "random":
|
||||
random.shuffle(order) #in random order
|
||||
session["block_order"][name] = order
|
||||
case "double_video":
|
||||
order = [] # order = list of stimuli keys
|
||||
list_1 = list(config[name]["stimuli"]["list_1"])
|
||||
@ -622,7 +623,8 @@ def show_tables():
|
||||
def login():
|
||||
|
||||
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
|
||||
return redirect(url_for("all_links"))
|
||||
|
||||
|
@ -262,7 +262,8 @@ step={{question["step"]}}
|
||||
|
||||
{% elif (questions[question]["type"] == "multiplechoice") %}
|
||||
<div class="compressWidth">
|
||||
<label>
|
||||
<p>
|
||||
<div>
|
||||
{{ questions[question]['text']}}
|
||||
|
||||
{% for point in questions[question]["points"] %}
|
||||
@ -272,7 +273,8 @@ step={{question["step"]}}
|
||||
{{ questions[question]['points'][point]['text']}}</label>
|
||||
|
||||
{% endfor %}
|
||||
</label>
|
||||
</div>
|
||||
</p>
|
||||
</div>
|
||||
<div class="spacer" aria-hidden="true" style="height:30px"></div>
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
"template": "standard_template.html",
|
||||
"stimuli": {
|
||||
"type": "single_video",
|
||||
"order": "",
|
||||
"list": {
|
||||
"video_1": "platzhalter-video.mp4"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user