vladyslav
commited on
Commit
·
083d2f0
1
Parent(s):
9f2f337
Removed overall rating from feedback
Browse files- app.py +1 -14
- utils/db.py +0 -2
app.py
CHANGED
@@ -64,7 +64,6 @@ def get_next_question(selected_answer):
|
|
64 |
gr.update(choices=answers, value=None, interactive=True, visible=True), # answer_radio
|
65 |
gr.update(visible=True), # next_button
|
66 |
gr.update(visible=False), # feedback_input
|
67 |
-
gr.update(visible=False), # rating_slider
|
68 |
gr.update(visible=False), # submit_feedback_button
|
69 |
gr.update(visible=False), # rating_text
|
70 |
gr.update(visible=False), # question_correct
|
@@ -89,7 +88,6 @@ def get_next_question(selected_answer):
|
|
89 |
gr.update(choices=answers, value=None, interactive=True, visible=True), # answer_radio
|
90 |
gr.update(visible=True), # next_button
|
91 |
gr.update(visible=False), # feedback_input
|
92 |
-
gr.update(visible=False), # rating_slider
|
93 |
gr.update(visible=False), # submit_feedback_button
|
94 |
gr.update(visible=False), # rating_text
|
95 |
gr.update(visible=False), # question_correct
|
@@ -106,7 +104,6 @@ def get_next_question(selected_answer):
|
|
106 |
gr.update(visible=False, value=None), # answer_radio
|
107 |
gr.update(visible=False), # next_button
|
108 |
gr.update(visible=True), # feedback_input
|
109 |
-
gr.update(visible=True), # rating_slider
|
110 |
gr.update(visible=True), # submit_feedback_button
|
111 |
gr.update(visible=True), # rating_text
|
112 |
gr.update(visible=True), # question_correct
|
@@ -121,18 +118,16 @@ def summarize_results(student_name,
|
|
121 |
model,
|
122 |
book,
|
123 |
feedback,
|
124 |
-
rating,
|
125 |
question_correct,
|
126 |
answers_correct,
|
127 |
interesting_question):
|
128 |
global questions_data, answers_log, feedback_questions
|
129 |
questions = []
|
130 |
|
131 |
-
if question_correct is None or answers_correct is None or interesting_question is None
|
132 |
return (
|
133 |
"# Залиште відгук про тест!", # question_output
|
134 |
gr.update(visible=True), # feedback_input
|
135 |
-
gr.update(visible=True), # rating_slider
|
136 |
gr.update(visible=True), # submit_feedback_button
|
137 |
gr.update(visible=True), # question_correct
|
138 |
gr.update(visible=True), # answers_correct
|
@@ -160,7 +155,6 @@ def summarize_results(student_name,
|
|
160 |
book,
|
161 |
questions,
|
162 |
feedback,
|
163 |
-
rating,
|
164 |
question_correct,
|
165 |
answers_correct,
|
166 |
interesting_question,
|
@@ -177,7 +171,6 @@ def summarize_results(student_name,
|
|
177 |
return (
|
178 |
summary, # question_output
|
179 |
gr.update(visible=False, value=""), # feedback_input
|
180 |
-
gr.update(visible=False, value=None), # rating_slider
|
181 |
gr.update(visible=False), # submit_feedback_button
|
182 |
gr.update(visible=False, value=None), # question_correct
|
183 |
gr.update(visible=False, value=None), # answers_correct
|
@@ -237,7 +230,6 @@ with gr.Blocks() as demo:
|
|
237 |
interesting_question_radio = gr.Radio([-2, -1, 0, 1, 2], label="Чи цікаві були запитання?", visible=False,
|
238 |
interactive=True)
|
239 |
feedback_input = gr.Textbox(label="Будь-який коментар про тест (за бажанням)", visible=False)
|
240 |
-
rating_buttons = gr.Radio([-2, -1, 0, 1, 2], label="Оцініть тест", visible=False, interactive=True)
|
241 |
submit_feedback_button = gr.Button("Завершити тест", visible=False)
|
242 |
|
243 |
class_name_input.change(
|
@@ -254,7 +246,6 @@ with gr.Blocks() as demo:
|
|
254 |
gr.update(choices=answers, interactive=True, visible=is_field_filled), # answer_radio
|
255 |
gr.update(visible=is_field_filled), # next_button
|
256 |
gr.update(visible=False, value=""), # feedback_input
|
257 |
-
gr.update(visible=False, value=None), # rating_buttons
|
258 |
gr.update(visible=False), # submit_feedback_button
|
259 |
gr.update(visible=False), # rating_text
|
260 |
gr.update(visible=False, value=None), # question_correct
|
@@ -278,7 +269,6 @@ with gr.Blocks() as demo:
|
|
278 |
answer_radio,
|
279 |
next_button,
|
280 |
feedback_input,
|
281 |
-
rating_buttons,
|
282 |
submit_feedback_button,
|
283 |
rating_text,
|
284 |
question_correct_radio,
|
@@ -297,7 +287,6 @@ with gr.Blocks() as demo:
|
|
297 |
answer_radio,
|
298 |
next_button,
|
299 |
feedback_input,
|
300 |
-
rating_buttons,
|
301 |
submit_feedback_button,
|
302 |
rating_text,
|
303 |
question_correct_radio,
|
@@ -315,7 +304,6 @@ with gr.Blocks() as demo:
|
|
315 |
model_radio,
|
316 |
book_radio,
|
317 |
feedback_input,
|
318 |
-
rating_buttons,
|
319 |
question_correct_radio,
|
320 |
answers_correct_radio,
|
321 |
interesting_question_radio,
|
@@ -323,7 +311,6 @@ with gr.Blocks() as demo:
|
|
323 |
outputs=[
|
324 |
question_output,
|
325 |
feedback_input,
|
326 |
-
rating_buttons,
|
327 |
submit_feedback_button,
|
328 |
question_correct_radio,
|
329 |
answers_correct_radio,
|
|
|
64 |
gr.update(choices=answers, value=None, interactive=True, visible=True), # answer_radio
|
65 |
gr.update(visible=True), # next_button
|
66 |
gr.update(visible=False), # feedback_input
|
|
|
67 |
gr.update(visible=False), # submit_feedback_button
|
68 |
gr.update(visible=False), # rating_text
|
69 |
gr.update(visible=False), # question_correct
|
|
|
88 |
gr.update(choices=answers, value=None, interactive=True, visible=True), # answer_radio
|
89 |
gr.update(visible=True), # next_button
|
90 |
gr.update(visible=False), # feedback_input
|
|
|
91 |
gr.update(visible=False), # submit_feedback_button
|
92 |
gr.update(visible=False), # rating_text
|
93 |
gr.update(visible=False), # question_correct
|
|
|
104 |
gr.update(visible=False, value=None), # answer_radio
|
105 |
gr.update(visible=False), # next_button
|
106 |
gr.update(visible=True), # feedback_input
|
|
|
107 |
gr.update(visible=True), # submit_feedback_button
|
108 |
gr.update(visible=True), # rating_text
|
109 |
gr.update(visible=True), # question_correct
|
|
|
118 |
model,
|
119 |
book,
|
120 |
feedback,
|
|
|
121 |
question_correct,
|
122 |
answers_correct,
|
123 |
interesting_question):
|
124 |
global questions_data, answers_log, feedback_questions
|
125 |
questions = []
|
126 |
|
127 |
+
if question_correct is None or answers_correct is None or interesting_question is None:
|
128 |
return (
|
129 |
"# Залиште відгук про тест!", # question_output
|
130 |
gr.update(visible=True), # feedback_input
|
|
|
131 |
gr.update(visible=True), # submit_feedback_button
|
132 |
gr.update(visible=True), # question_correct
|
133 |
gr.update(visible=True), # answers_correct
|
|
|
155 |
book,
|
156 |
questions,
|
157 |
feedback,
|
|
|
158 |
question_correct,
|
159 |
answers_correct,
|
160 |
interesting_question,
|
|
|
171 |
return (
|
172 |
summary, # question_output
|
173 |
gr.update(visible=False, value=""), # feedback_input
|
|
|
174 |
gr.update(visible=False), # submit_feedback_button
|
175 |
gr.update(visible=False, value=None), # question_correct
|
176 |
gr.update(visible=False, value=None), # answers_correct
|
|
|
230 |
interesting_question_radio = gr.Radio([-2, -1, 0, 1, 2], label="Чи цікаві були запитання?", visible=False,
|
231 |
interactive=True)
|
232 |
feedback_input = gr.Textbox(label="Будь-який коментар про тест (за бажанням)", visible=False)
|
|
|
233 |
submit_feedback_button = gr.Button("Завершити тест", visible=False)
|
234 |
|
235 |
class_name_input.change(
|
|
|
246 |
gr.update(choices=answers, interactive=True, visible=is_field_filled), # answer_radio
|
247 |
gr.update(visible=is_field_filled), # next_button
|
248 |
gr.update(visible=False, value=""), # feedback_input
|
|
|
249 |
gr.update(visible=False), # submit_feedback_button
|
250 |
gr.update(visible=False), # rating_text
|
251 |
gr.update(visible=False, value=None), # question_correct
|
|
|
269 |
answer_radio,
|
270 |
next_button,
|
271 |
feedback_input,
|
|
|
272 |
submit_feedback_button,
|
273 |
rating_text,
|
274 |
question_correct_radio,
|
|
|
287 |
answer_radio,
|
288 |
next_button,
|
289 |
feedback_input,
|
|
|
290 |
submit_feedback_button,
|
291 |
rating_text,
|
292 |
question_correct_radio,
|
|
|
304 |
model_radio,
|
305 |
book_radio,
|
306 |
feedback_input,
|
|
|
307 |
question_correct_radio,
|
308 |
answers_correct_radio,
|
309 |
interesting_question_radio,
|
|
|
311 |
outputs=[
|
312 |
question_output,
|
313 |
feedback_input,
|
|
|
314 |
submit_feedback_button,
|
315 |
question_correct_radio,
|
316 |
answers_correct_radio,
|
utils/db.py
CHANGED
@@ -30,7 +30,6 @@ def save_results(student_name,
|
|
30 |
book,
|
31 |
questions,
|
32 |
feedback,
|
33 |
-
rating,
|
34 |
question_correct,
|
35 |
answers_correct,
|
36 |
interesting_question,
|
@@ -47,7 +46,6 @@ def save_results(student_name,
|
|
47 |
"answers_correct": answers_correct,
|
48 |
"interesting_question": interesting_question,
|
49 |
"feedback": feedback,
|
50 |
-
"rating": rating,
|
51 |
"grade": grade,
|
52 |
"correct_answers": correct_answers,
|
53 |
"created_at": db.command("serverStatus")["localTime"]
|
|
|
30 |
book,
|
31 |
questions,
|
32 |
feedback,
|
|
|
33 |
question_correct,
|
34 |
answers_correct,
|
35 |
interesting_question,
|
|
|
46 |
"answers_correct": answers_correct,
|
47 |
"interesting_question": interesting_question,
|
48 |
"feedback": feedback,
|
|
|
49 |
"grade": grade,
|
50 |
"correct_answers": correct_answers,
|
51 |
"created_at": db.command("serverStatus")["localTime"]
|