debate_LMS / src /views /week3.py
raymondEDS's picture
week 4 contents
e74c738
import streamlit as st
from utils import init_supabase, save_submission, get_existing_submission, get_all_submissions
def show_week3_content():
"""Show Week 3 content"""
st.title("πŸ—οΈ Week 3: How to Construct a Debate Case")
st.markdown("---")
# Check if user is authenticated
if not st.session_state.get('authenticated', False):
st.error("Please log in to access this content.")
return
# Get username for submissions
username = st.session_state.get('username')
# Debug: Show user information
st.sidebar.markdown("---")
st.sidebar.markdown("**Debug Info:**")
st.sidebar.write(f"Username: {username}")
if not username:
st.error("Unable to retrieve user information. Please try logging in again.")
return
# Week overview
st.markdown("""
## 🎯 Learning Objectives
- Understand the structure of an Affirmative (AF) case using SHITS (Significance, Harms, Inherency, Topicality, Solvency)
- Understand the structure of a Disadvantage (DA) and how to challenge a plan
- Practice building and critiquing debate cases
""")
# Content tabs
tab1, tab2, tab3, tab4 = st.tabs([
"🎯 Opening Activity", "πŸ“– Lecture Materials", "πŸ“ Activities", "πŸ“š Homework"
])
with tab1:
st.subheader("🎯 Opening Activity: What Makes a Good Case?")
st.markdown("""
**For Individual Study:** Think about a time you tried to convince someone of something important. What made your argument strong or weak? Write down your thoughts.
**For Classroom Use:** Discuss in pairs or small groups: What do you think makes a debate case effective? Share examples of strong and weak arguments you've heard.
""")
st.markdown("---")
st.markdown("**Reflection Questions:**")
reflection_questions = [
"What do you think is the most important part of a debate case?",
"Have you ever heard a debate case that was especially convincing or unconvincing? Why?",
"What do you hope to learn about case writing this week?"
]
reflection_answers = []
for i, question in enumerate(reflection_questions, 1):
answer = st.text_area(f"Question {i}: {question}", key=f"week3_reflection_{i}", height=100)
reflection_answers.append(answer)
if st.button("Submit Reflection", key="week3_reflection_submit"):
if all(reflection_answers):
submission_data = {
"questions": [
{
"id": f"reflection_{i+1}",
"type": "textarea",
"question": question,
"student_answer": answer,
"max_length": 500
}
for i, (question, answer) in enumerate(zip(reflection_questions, reflection_answers))
]
}
if save_submission(username, 3, 'reflection', submission_data):
st.success("βœ… Reflection submitted successfully!")
st.rerun()
else:
st.error("❌ Failed to submit reflection. Please try again.")
else:
st.warning("Please answer all reflection questions before submitting.")
with tab2:
st.subheader("πŸ“– Lecture Materials")
st.markdown("""
## The Affirmative (AF) Case Structure: SHITS
- **Significance:** Why is the issue important? Why should people care?
- **Harms:** What bad things are happening now because the problem isn't solved?
- **Inherency:** Why does the problem still exist? What's stopping it from being fixed?
- **Topicality:** How does your plan fit the debate topic (resolution)?
- **Solvency:** How does your plan fix the problem?
### Example (Resolution: "States should ban nuclear weapons")
- **Significance:** "If India and Pakistan don't reduce their nuclear weapons, a nuclear war could happen and harm millions."
- **Harms:** "Rising tension between India and Pakistan could lead to nuclear war."
- **Inherency:** "No current agreements force India and Pakistan to disarm. Each is waiting for the other."
- **Topicality:** "Our plan is for India and Pakistan to reduce nuclear weapons, which matches the resolution."
- **Solvency:** "A mutual disarmament treaty reduces the chance of war. Evidence shows joint disarmament builds trust."
## The Disadvantage (DA) Structure
- **Uniqueness:** What's good or stable about the world right now?
- **Link:** How does the AF plan change that?
- **Internal Link:** What does that change lead to?
- **Impact:** What's the bad thing that happens?
- **Terminal Impact:** What is the worst-case scenario (e.g., extinction)?
### Example (Resolution: "The U.S. federal government should increase its investment in public transportation.")
- **Uniqueness:** "U.S. debt is under control; inflation is slowing."
- **Link:** "The plan spends $10B more, increasing debt and inflation."
- **Internal Link:** "Higher inflation leads to higher interest rates, slowing the economy."
- **Impact:** "A weaker economy means job loss, especially for vulnerable groups."
- **Terminal Impact:** "Economic collapse or worse."
""")
with tab3:
st.subheader("πŸ“ Activities: Build It and Break It")
st.markdown("""
### πŸ“„ Example Debate Case
**Before starting the activities, please review this example debate case:**
""")
# Add download button
download_url = "https://docs.google.com/document/d/1J8Unkklwhk778jcARshISK0AdBZ34XikQpeBDAWAxY0/edit?tab=t.3t21ivxifp52#heading=h.vsxctn9u5gyw"
st.markdown(f"[πŸ“₯ Download as Word Document]({download_url})")
# Embed the Google Document
google_doc_url = "https://docs.google.com/document/d/1J8Unkklwhk778jcARshISK0AdBZ34XikQpeBDAWAxY0/edit?tab=t.3t21ivxifp52#heading=h.vsxctn9u5gyw"
embed_url = google_doc_url.replace("edit", "preview")
st.markdown(f"""
<iframe
src="{embed_url}"
width="100%"
height="600"
frameborder="0"
style="border: 1px solid #ddd; border-radius:5px;">
</iframe>
""", unsafe_allow_html=True)
with tab4:
st.subheader("πŸ“š Homework: Start Your Debate Case")
st.markdown("""
**Assignment:** Start writing your debate case using the proper case structure (SHITS for AF, DA for Neg). Turn in a Google Doc link.
""")
st.markdown("---")
st.markdown("**Submit your homework assignment:**")
google_docs_link = st.text_input(
"Paste your Google Docs link here:",
placeholder="https://docs.google.com/document/d/...",
key="week3_homework_link"
)
if st.button("Submit Homework Assignment", key="week3_homework_submit"):
if google_docs_link.strip():
if "docs.google.com" in google_docs_link:
submission_data = {
"questions": [
{
"id": "google_docs_link",
"type": "text_input",
"question": "Google Docs Link",
"student_answer": google_docs_link
}
]
}
if save_submission(username, 3, 'homework', submission_data):
st.success("βœ… Homework assignment submitted successfully!")
st.rerun()
else:
st.error("❌ Failed to submit homework. Please try again.")
else:
st.error("❌ Please provide a valid Google Docs link.")
else:
st.warning("Please provide your Google Docs link before submitting.")