Maryam Ilka commited on
Commit
05390a1
·
verified ·
1 Parent(s): 6028b16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -36
app.py CHANGED
@@ -525,18 +525,8 @@ def map_view():
525
  st.session_state.current_page = "attention_check1"
526
  st.rerun()
527
 
528
-
529
  def attention_check1():
530
- """سوال توجه اول (رادیویی ساده)"""
531
- st.markdown("""
532
- <style>
533
- /* تضمین رنگ متن برای تمام سطوح */
534
- .st-ec, .st-ed, .st-ee, .st-ef, .st-eg, .st-eh, .st-ei, .st-ej {
535
- color: black !important;
536
- }
537
- </style>
538
- """, unsafe_allow_html=True)
539
- st.markdown("### 📋 سوالات تکمیلی")
540
  st.markdown("### سوال توجه")
541
 
542
  answer = st.radio(
@@ -546,25 +536,12 @@ def attention_check1():
546
  key="attention_check1"
547
  )
548
 
549
- if answer:
550
- if answer == "بنفش":
551
- st.session_state.current_page = "random_likert_questions"
552
- st.rerun()
553
- else:
554
- st.error("پاسخ صحیح نبود. لطفاً دقت بیشتری به خرج دهید.")
555
- time.sleep(2)
556
- st.rerun()
557
 
558
  def attention_check2():
559
- """سوال توجه دوم (رادیویی ساده)"""
560
- st.markdown("""
561
- <style>
562
- /* تضمین رنگ متن برای تمام سطوح */
563
- .st-ec, .st-ed, .st-ee, .st-ef, .st-eg, .st-eh, .st-ei, .st-ej {
564
- color: black !important;
565
- }
566
- </style>
567
- """, unsafe_allow_html=True)
568
  st.markdown("### سوال توجه")
569
 
570
  answer = st.radio(
@@ -574,14 +551,9 @@ def attention_check2():
574
  key="attention_check2"
575
  )
576
 
577
- if answer:
578
- if answer == "راهیار":
579
- st.session_state.current_page = "explanation_questions"
580
- st.rerun()
581
- else:
582
- st.error("پاسخ صحیح نبود. لطفاً دقت بیشتری به خرج دهید.")
583
- time.sleep(2)
584
- st.rerun()
585
 
586
  def random_likert_questions():
587
  """نمایش تصادفی سوالات لیکرت"""
 
525
  st.session_state.current_page = "attention_check1"
526
  st.rerun()
527
 
 
528
  def attention_check1():
529
+ """سوال توجه اول (بدون بررسی پاسخ صحیح)"""
 
 
 
 
 
 
 
 
 
530
  st.markdown("### سوال توجه")
531
 
532
  answer = st.radio(
 
536
  key="attention_check1"
537
  )
538
 
539
+ if answer: # فقط بررسی می‌کنیم که پاسخی داده شده باشد
540
+ st.session_state.current_page = "random_likert_questions"
541
+ st.rerun()
 
 
 
 
 
542
 
543
  def attention_check2():
544
+ """سوال توجه دوم (بدون بررسی پاسخ صحیح)"""
 
 
 
 
 
 
 
 
545
  st.markdown("### سوال توجه")
546
 
547
  answer = st.radio(
 
551
  key="attention_check2"
552
  )
553
 
554
+ if answer: # فقط بررسی می‌کنیم که پاسخی داده شده باشد
555
+ st.session_state.current_page = "explanation_questions"
556
+ st.rerun()
 
 
 
 
 
557
 
558
  def random_likert_questions():
559
  """نمایش تصادفی سوالات لیکرت"""