Closed dunland closed 2 years ago
I pushed some commits on data-view branch (work in progress).
(Status) Now, the questionnaire view shows the default 6 questions randomly. Todo: Change with socket message is implemented but not tested with socket messaging
Great! I just tested switching the modes via frontend. It works! Some more TODOs:
UPDATE: whenever the slider is updated, it sends a json string via UDP:
{
"year": 0,
"foerderung": 0,
"CO2-Preis": 0,
"CO2-emissions": 0,
"versorgung": 0,
"investment": 0,
"anschluss": 0,
"connection_speed": 0,
"mode": "questionnaire",
"answer": "yes"
}
These are the values that can be accessed using the slider (as of today).
hi David, I created the questionnaire (single user mode) as above. I haven't tested with socket messaging yet, but the function is implemented. I couldn't recreate the bug you mentioned as the first todo. Do you mean when you hit the space bar to toggle the view, the question becomes "the question was not provided" after the second time? (In my envronment, everytime I enter the questionnaire mode, a randomely selected question shows up)
socket communication works perfectly! ..except that after some playing around, it always says "question not provided" ‒ switching the modes via space bar works fine and even reloads the question, but using the socket communication it does not. Is there a difference between the two ways of switching?
I though it would be a good idea to transmit a message containing "question_number" to access the specific questions one after the other.
{"year": 0, "foerderung": 0, "CO2-Preis": 0, "connection_speedCO2-emissions": 0, "versorgung": 0, "investment": 0, "anschluss": 0, "answer": "yes", "mode": "questionnaire", "question_number": 0}
https://github.com/quarree100/qScope_frontend/commit/b520f47abd080bd66bc97ad9b5ed3dd9889e7e97:
The questions are now sent to the infoscreen via socket message directly.
e.g. "question": "Die globale Erderwärmung wird durch von Menschen produzierte Emissionen verstärkt."
all implemented in data-view branch
As briefly outlined in here, there is a preliminary questionnaire mode preceding the general input mode. We will need a simple layout like this:
As example questions, we can take these:
each to be answered with yes or no. Each answer directly leads to the next question, and the last question eventually starts the general input mode.
open questions