Skip to content

Commit

Permalink
fix result
Browse files Browse the repository at this point in the history
  • Loading branch information
Danieldu committed Sep 19, 2023
1 parent 2de8f85 commit 2f6c7fb
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 40 deletions.
12 changes: 6 additions & 6 deletions component/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,25 @@ def update_button_states(self):
self.similarities_list.updateState(current_question.get_similarity())

def submit_test(self):
for question in self.answerList:
question.set_answer(pofomopo_consonants[question.get_answer()] if question.get_answer()!= -1 else -1)
question.set_similarity(similarity_list[question.get_similarity()] if question.get_similarity()!=-1 else -1)
print(self.answerList)
return EndScreen(self.win,self.answerList)

def updateProcess(self):
self.progress.set_text("Test Number:{}/{}".format(self.current_index+1,len(self.answerList)))

# Action for BofoMo consonants
def bofomo_consonant_action(self, button_index):
selected_consonant = pofomopo_consonants[button_index]
current_question = self.answerList[self.current_index]
current_question.set_answer(button_index)
print(f"BofoMo consonant button clicked: {selected_consonant}")
self.bofomo_consonants_list.updateState(current_question.get_answer())
self.bofomo_consonants_list.updateState(button_index)
return self

# Action for similarities
def similarity_action(self, button_index):
selected_similarity = similarity_list[button_index]
print("selected_similarity:",selected_similarity)
current_question = self.answerList[self.current_index]
current_question.set_similarity(selected_similarity)
current_question.set_similarity(button_index)
self.similarities_list.updateState(button_index)
return self
1 change: 0 additions & 1 deletion component/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
class TextElement:
def __init__(self, win, text, pos, color=(1, 1, 1)):
self.text = TextStim(win, text=text, pos=pos, color=color,colorSpace='rgb',font='Noto Sans TC',fontFiles=[font_dir])

def set_text(self,text):
self.text.setText(text)
def set_color(self,color):
Expand Down
57 changes: 25 additions & 32 deletions static/csv/history.csv
Original file line number Diff line number Diff line change
@@ -1,41 +1,34 @@
question,particiapnts_no,participants_ans,participants_evaluation
2,2,2,1
0,14,3,1

6,8,4,1
0,19,2,1
4,9,3,1
3,-1,-1,1
2,-1,-1,1
7,-1,-1,1
5,-1,-1,1
1,-1,-1,1
4,-1,-1,1
6,-1,-1,1
6,3,2,2
2,-1,-1,2
7,-1,-1,2
5,-1,-1,2
3,-1,-1,2
1,-1,-1,2
0,-1,-1,2
4,-1,-1,2
4,2,3,3
2,-1,-1,3
1,-1,-1,3
7,-1,-1,3
5,-1,-1,1
2,ㄅ,1,2
6,ㄆ,2,2
1,ㄇ,3,2
5,ㄈ,4,2
3,ㄉ,5,2
4,ㄙ,5,2
7,ㄙ,5,2
0,ㄙ,5,2
7,ㄉ,5,3
5,-1,-1,3
0,-1,-1,3
2,-1,-1,3
6,-1,-1,3
4,-1,-1,3
3,-1,-1,3
6,3,3,4
7,-1,-1,4
4,-1,-1,4
3,-1,-1,4
1,-1,-1,3
3,ㄅ,1,4
4,ㄆ,2,4
0,ㄇ,3,4
2,ㄈ,4,4
1,ㄉ,5,4
6,-1,-1,4
5,-1,-1,4
2,-1,-1,4
1,-1,-1,4
0,-1,-1,4
4,3,4,5
1,-1,-1,5
3,-1,-1,5
5,-1,-1,5
2,-1,-1,5
7,-1,-1,5
0,-1,-1,5
6,-1,-1,5
7,-1,-1,4
1 change: 0 additions & 1 deletion static/csv/user.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ participantID
2
3
4
5

0 comments on commit 2f6c7fb

Please sign in to comment.