Questions now displaying properly for story

This commit is contained in:
2019-01-04 10:16:02 +00:00
parent cde40f17cf
commit 221ac4726e
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -68,7 +68,8 @@ class EEGStoryTrainThread(BaseThread):
self.dev_mode = True
def setQuestion(self, q):
self.socketio.emit('current_question', data=q[0], namespace='/main')
self.socketio.emit('set_question', data=q[0], namespace='/main')
set_trace()
def testLoop(self):
'''
+4 -1
View File
@@ -21,7 +21,7 @@
<div id="question_overlay">
<div class="card">
<div class="card-body">
<p id=question></p>
<p id="question"></p>
<div class="form-group">
<label for="answer">Answer:</label>
<textarea class="form-control" rows="5" id="answer"></textarea>
@@ -74,6 +74,9 @@
displayInstructions();
});
socket.on('set_question', function(msg) {
$('#question').text("Question: " + msg);
});
socket.on('test_ready', function(msg) {
loading = false;