CSRF removed, double video now working with everything
This commit is contained in:
parent
69220b836a
commit
c9c3bfce12
@ -38,6 +38,7 @@ app.secret_key = b"29fe9e8edd407c5491d4f1c05632d9fa33e26ed8734a3f5e080ebac3772a5
|
|||||||
|
|
||||||
UPLOAD_FOLDER = 'uploads'
|
UPLOAD_FOLDER = 'uploads'
|
||||||
|
|
||||||
|
#csrf = CSRFProtect(app) #enable CSRF protection globally
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -338,7 +339,7 @@ def sendpage_json():
|
|||||||
session_user_id = session["slaeform_user_id"]
|
session_user_id = session["slaeform_user_id"]
|
||||||
new_id = uuid.uuid4()
|
new_id = uuid.uuid4()
|
||||||
date = datetime.today()
|
date = datetime.today()
|
||||||
stimulus_name = session["current_stimulus_name"]
|
stimulus_name = str(session["current_stimulus_name"])
|
||||||
|
|
||||||
new_entry = db_tables[table_name](id=new_id,user_id = session_user_id,date_created = date,stimulus_name=stimulus_name)
|
new_entry = db_tables[table_name](id=new_id,user_id = session_user_id,date_created = date,stimulus_name=stimulus_name)
|
||||||
|
|
||||||
|
@ -1,4 +1,55 @@
|
|||||||
{
|
{
|
||||||
|
"Block 0":{
|
||||||
|
"type": "TaskTemplate",
|
||||||
|
"tempalte": "standard_template.html",
|
||||||
|
"stimuli":{
|
||||||
|
"type":"double_video",
|
||||||
|
"list_1":{
|
||||||
|
"video_1":"https://www.youtube-nocookie.com/embed/VtnwHmabyzo?si=H3rrG-GHtlSymR70",
|
||||||
|
"video_2":"https://www.youtube-nocookie.com/embed/EL76Ok4r0aQ?si=hqUm8eUUfX39NN4L",
|
||||||
|
"video_3":"https://www.youtube-nocookie.com/embed/XTMIomsXxKM?si=r2zB6OKERH6Jdpi6"
|
||||||
|
},
|
||||||
|
"list_2":{
|
||||||
|
"video_1":"https://www.youtube-nocookie.com/embed/VtnwHmabyzo?si=H3rrG-GHtlSymR70",
|
||||||
|
"video_2":"https://www.youtube-nocookie.com/embed/EL76Ok4r0aQ?si=hqUm8eUUfX39NN4L",
|
||||||
|
"video_3":"https://www.youtube-nocookie.com/embed/XTMIomsXxKM?si=r2zB6OKERH6Jdpi6"
|
||||||
|
},
|
||||||
|
"configuration":{
|
||||||
|
"embed":"yt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"questions":{
|
||||||
|
"question1":{
|
||||||
|
"type": "likert",
|
||||||
|
"name": "likertscale",
|
||||||
|
"text": "How would you rate this video?",
|
||||||
|
"required": "true",
|
||||||
|
"points":{
|
||||||
|
"p1":{
|
||||||
|
"value":"1",
|
||||||
|
"text":"I dont like it at all"
|
||||||
|
},
|
||||||
|
"p2":{
|
||||||
|
"value":"2",
|
||||||
|
"text":"I am indifferent"
|
||||||
|
},
|
||||||
|
"p3":{
|
||||||
|
"value":"3",
|
||||||
|
"text":"I like it a lot"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"database_table" :{
|
||||||
|
"table_name": "double_video_test",
|
||||||
|
"fields": {
|
||||||
|
"likertscale":{
|
||||||
|
"type": "integer",
|
||||||
|
"nullable": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Block 1":{
|
"Block 1":{
|
||||||
"type": "TaskTemplate",
|
"type": "TaskTemplate",
|
||||||
"tempalte": "standard_template.html",
|
"tempalte": "standard_template.html",
|
||||||
|
0
slaeforms/static/likertscript.js
Normal file
0
slaeforms/static/likertscript.js
Normal file
@ -226,7 +226,7 @@ iframe { /* center the iframe, mostly unnecessary */
|
|||||||
|
|
||||||
/* Likert stuff */
|
/* Likert stuff */
|
||||||
.likert {
|
.likert {
|
||||||
--likert-rows: 5;
|
/* --likert-rows: 5;*/
|
||||||
margin: auto;
|
margin: auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
display: inline-grid;
|
display: inline-grid;
|
||||||
|
@ -108,7 +108,7 @@ step={{question["step"]}}
|
|||||||
{% if (questions[question]["type"] == "likert") %}
|
{% if (questions[question]["type"] == "likert") %}
|
||||||
<div class="likercontainer">
|
<div class="likercontainer">
|
||||||
<h3>{{ questions[question]['text']}}</h3>
|
<h3>{{ questions[question]['text']}}</h3>
|
||||||
<div class="likert">
|
<div class="likert" style="--likert-rows: {{ questions[question]['points']|length() }}">
|
||||||
{% for point in questions[question]["points"] %}
|
{% for point in questions[question]["points"] %}
|
||||||
<label>
|
<label>
|
||||||
<input name="{{ questions[question]['name']}}" type="radio"
|
<input name="{{ questions[question]['name']}}" type="radio"
|
||||||
|
@ -11,7 +11,6 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<h2>Hello! Thank you for participating in our study!</h2>
|
<h2>Hello! Thank you for participating in our study!</h2>
|
||||||
<form action="http://localhost:5000/start" method="post">
|
<form action="http://localhost:5000/start" method="post">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}" />
|
|
||||||
<label for="terms-and-conditions">
|
<label for="terms-and-conditions">
|
||||||
<input class="inline" id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the +terms and conditions</a>
|
<input class="inline" id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the +terms and conditions</a>
|
||||||
</label>
|
</label>
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<form class="dsgvoform" action="http://localhost:5000/teststart" method="post">
|
<form class="dsgvoform" action="http://localhost:5000/teststart" method="post">
|
||||||
|
|
||||||
<label for="terms-and-conditions">
|
<label for="terms-and-conditions">
|
||||||
<input class="inline" id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the +terms and conditions</a>
|
<input class="inline" id="terms-and-conditions" type="checkbox" required name="terms-and-conditions" /> I accept the +terms and conditions
|
||||||
</label>
|
</label>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<input id="submitbutton" type = "submit" value = "submit" />
|
<input id="submitbutton" type = "submit" value = "submit" />
|
||||||
|
Loading…
Reference in New Issue
Block a user