diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 44f6878..b218814 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,11 +3,9 @@ - - - + + + + + + + @@ -105,7 +114,7 @@ - + @@ -123,7 +132,23 @@ + + + + + file://$PROJECT_DIR$/main.py + 73 + + + file://$PROJECT_DIR$/main.py + 82 + + + + - + \ No newline at end of file diff --git a/__pycache__/main.cpython-39.pyc b/__pycache__/main.cpython-39.pyc index aa95f99..4e6a814 100644 Binary files a/__pycache__/main.cpython-39.pyc and b/__pycache__/main.cpython-39.pyc differ diff --git a/data/questionare.csv b/data/questionare.csv index 575e537..1d7b88f 100644 --- a/data/questionare.csv +++ b/data/questionare.csv @@ -9,3 +9,16 @@ IP,Style,Frequency,Age,Gender 127.0.0.1,B,B,E,A, 127.0.0.1,A,A,D,C, 127.0.0.1,A,A,A,C, +127.0.0.1,C,A,D,C, +127.0.0.1,D,A,A,C, +127.0.0.1,D,A,,B, +127.0.0.1,B,A,D,A, +127.0.0.1,A,A,C,A, +127.0.0.1,B,A,B,A, +127.0.0.1,B,A,C,A, +127.0.0.1,D,A,C,A, +127.0.0.1,D,A,C,A, +127.0.0.1,D,A,A,A, +127.0.0.1,C,E,A,B, +127.0.0.1,B,A,D,A, +127.0.0.1,A,A,A,B, diff --git a/main.py b/main.py index a4e983c..1f3d67d 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import json import os from IDManager import idManager @@ -70,9 +71,16 @@ def gameanno(id): def getJSONData(id): if request.method == 'POST': print("POST Game") - print(request.values) + print(request.form) + print(list(request.form)) + resultList = list(request.form)[0].split(",") + for i,j in request.form.items(): + print(i) + print(j) + + # FIXME: NOT SAVING! - saveFile(replayDataPath, request.json[4], request.json) + saveFile(replayDataPath, id+resultList[0] , str(resultList[1:])) return "get!" diff --git a/reps/127.0.0.1.txt b/reps/127.0.0.1.txt new file mode 100644 index 0000000..e69de29 diff --git a/reps/127.0.0.1lvl3066.txt b/reps/127.0.0.1lvl3066.txt new file mode 100644 index 0000000..e69de29 diff --git a/reps/127.0.0.1lvl6966.txt b/reps/127.0.0.1lvl6966.txt new file mode 100644 index 0000000..e1ac7ec --- /dev/null +++ b/reps/127.0.0.1lvl6966.txt @@ -0,0 +1 @@ +['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2', '2'] \ No newline at end of file diff --git a/reps/127.0.0.1lvl7966.txt b/reps/127.0.0.1lvl7966.txt new file mode 100644 index 0000000..6d5db34 --- /dev/null +++ b/reps/127.0.0.1lvl7966.txt @@ -0,0 +1 @@ +['0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'] \ No newline at end of file diff --git a/templates/data.js b/templates/data.js index 5a33160..95c0555 100644 --- a/templates/data.js +++ b/templates/data.js @@ -34,7 +34,7 @@ function PlayLevel(group, level){ return returnVal.then(function(){ console.log("the return val is ready"); console.log(returnVal.value); - PostToServer(window.location.href+"/data",returnVal.value); + PostToServer(window.location.href+"/data",group+returnVal.value); //Array.from() }); }