Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
499a0e9
bug_fix
JaikishanMK0701 Dec 3, 2025
ba27647
Modified service.py, ui.py
JaikishanMK0701 Dec 3, 2025
d760b2e
init
JaikishanMK0701 Dec 3, 2025
97cec54
Implemented Announcements, Schedule Area, fixed parent engagement UI,…
Dec 3, 2025
3124ec2
Fix ScheduleRepository indentation and correct parent schedule query
Dec 3, 2025
6598ad9
Merge pull request #4 from aerwin-ds/jm_bug_fix
JaikishanMK0701 Dec 3, 2025
2e0e0d5
docs: Update QUICKSTART with secure API key setup instructions
WashKeith Dec 3, 2025
b6b0f1d
Fix: Restore low_grade_alerts_guidance feature deleted in jm_bug_fix …
aerwin-ds Dec 3, 2025
b76c7e3
bug fix
JaikishanMK0701 Dec 4, 2025
159eac4
update feature
JaikishanMK0701 Dec 4, 2025
60ec553
feat: Complete bug fixes and feature implementations
WashKeith Dec 4, 2025
93b87aa
docs: Clarify Groq API setup in .env.example
WashKeith Dec 4, 2025
08f49f5
Merge branch 'main' of https://github.com/aerwin-ds/GradeReporter
WashKeith Dec 4, 2025
9c79476
add after hour table
JaikishanMK0701 Dec 4, 2025
3f6a10a
Merge branch 'main' into jm_bug_fix_1
JaikishanMK0701 Dec 4, 2025
c86be6b
Merge pull request #5 from aerwin-ds/jm_bug_fix_1
JaikishanMK0701 Dec 4, 2025
c5c462f
Add database migration script for schedule feature from Meetika's texts
aerwin-ds Dec 4, 2025
35b1c9b
Merge meetika-schedule-updates: Fix schedule feature database schema
aerwin-ds Dec 4, 2025
608d54e
Merge branch 'main' of https://github.com/aerwin-ds/GradeReporter
aerwin-ds Dec 4, 2025
dae9859
fix: resolve blank page display for My Grades, Announcements, and Sch…
WashKeith Dec 4, 2025
718e085
fix: replace deprecated st.experimental_rerun() with st.rerun() in an…
WashKeith Dec 4, 2025
f2fb037
feat: Add grade change notifications system and improve grade management
WashKeith Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ SESSION_TIMEOUT_MINUTES=30
DEFAULT_TIMEZONE=UTC

# AI/LLM Configuration
GOOGLE_API_KEY=your-google-api-key-here
# Using Groq free API with Llama 3.3 70B model
# No credit card required - completely free!
# Get your free token at: https://console.groq.com/keys
# Each team member should create their own token for local testing
GROQ_API_TOKEN=your_groq_api_token_here

# Feature Flags (enable/disable features)
FEATURE_AUTHENTICATION=True
Expand Down
164 changes: 0 additions & 164 deletions Announcements Page

This file was deleted.

17 changes: 9 additions & 8 deletions QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ uv pip install -r requirements.txt
# Copy environment file
cp .env.example .env

# ⚠️ IMPORTANT: Add Google API Key for AI Progress Reports
# Edit .env and add this line:
# GOOGLE_API_KEY=AIzaSyD_E490uOyT2_Tiy5x5_i43M0E8F7xa5Ww
# ✨ AI Progress Reports: Uses FREE Groq API with Llama 3.3 70B!
# 1. Go to https://console.groq.com/keys
# 2. Create a new API key
# 3. Copy the key
# 4. Edit .env and add: GROQ_API_TOKEN=your_key_here
```

## 2. Create Test Database (1 minute)
Expand Down Expand Up @@ -87,11 +89,10 @@ The test database includes:
## Troubleshooting

**Problem**: AI Progress Reports not working
- Ensure `GOOGLE_API_KEY` is set in `.env` file
- Add this line to your `.env`:
```
GOOGLE_API_KEY=AIzaSyD_E490uOyT2_Tiy5x5_i43M0E8F7xa5Ww
```
- Ensure `GROQ_API_TOKEN` is set in `.env` file
- Get a free token at: https://console.groq.com/keys (no credit card required!)
- Each team member should create their own token
- Reports are cached after first generation to reduce API calls

**Problem**: Import errors
```bash
Expand Down
22 changes: 18 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
import streamlit as st
from src.core.session import session
from src.ui.components.navigation import render_navigation, get_pages_for_role
from src.ui.components.navigation import render_navigation, get_pages_for_role, get_current_page
from config.settings import APP_NAME


Expand Down Expand Up @@ -56,9 +56,23 @@ def main():
# Show navigation and main content
render_navigation()

# Show home page
from src.ui.pages.home import show_home_page
show_home_page()
current_page = get_current_page()

if current_page == "home":
from src.ui.pages.home import show_home_page
show_home_page()

elif current_page == "after_hours":
from src.ui.pages.after_hours import show_after_hours_page
show_after_hours_page()

elif current_page in ["student_dashboard", "parent_dashboard", "teacher_dashboard", "admin_dashboard",
"parent_engagement", "low_grade_alerts", "announcements", "schedule_area"]:
from src.ui.pages.home import show_home_page
show_home_page()

else:
st.info(f"Page '{current_page}' is under construction.")


if __name__ == "__main__":
Expand Down
5 changes: 3 additions & 2 deletions config/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@ def execute_query(self, query: str, params: tuple = (), db_type: str = 'main'):
db_type: Either 'main' or 'after_hours'

Returns:
List of result rows
List of result rows as dictionaries
"""
with self.get_connection(db_type) as conn:
conn.row_factory = sqlite3.Row
cursor = conn.cursor()
cursor.execute(query, params)
return cursor.fetchall()
return [dict(row) for row in cursor.fetchall()]

def execute_update(self, query: str, params: tuple = (), db_type: str = 'main') -> int:
"""
Expand Down
1 change: 1 addition & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
'parent_engagement': os.getenv('FEATURE_PARENT_ENGAGEMENT', 'True').lower() == 'true',
'after_hours': os.getenv('FEATURE_AFTER_HOURS', 'True').lower() == 'true',
'ai_progress_reports': os.getenv('FEATURE_AI_PROGRESS_REPORTS', 'True').lower() == 'true',
'schedule_area': True,
'feature_6': os.getenv('FEATURE_6', 'False').lower() == 'true',
'feature_7': os.getenv('FEATURE_7', 'False').lower() == 'true',
'feature_8': os.getenv('FEATURE_8', 'False').lower() == 'true',
Expand Down
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ bcrypt>=4.0.0
pytz>=2023.3

# AI/LLM Integration
google-auth>=2.0.0
langchain>=1.0.0
langchain-google-genai>=3.1.0
langchain-core>=1.0.0
huggingface-hub>=0.16.0
requests>=2.27.0

# Development & Testing
faker>=20.0.0
Expand Down
39 changes: 39 additions & 0 deletions scripts/add_after_hours_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import sqlite3
from pathlib import Path

# 🔧 If your DB is in a different place/name, change this.
DB_PATH = Path("data") / "school_system.db"

DDL = """
CREATE TABLE IF NOT EXISTS AfterHoursRequests (
request_id INTEGER PRIMARY KEY AUTOINCREMENT,
requester_id INTEGER NOT NULL,
requester_role TEXT NOT NULL,
teacher_id INTEGER NOT NULL,
student_id INTEGER,
question TEXT NOT NULL,
submitted_at TEXT NOT NULL,
status TEXT NOT NULL,
teacher_response TEXT,
response_time TEXT,
FOREIGN KEY(requester_id) REFERENCES Users(user_id),
FOREIGN KEY(teacher_id) REFERENCES Teachers(teacher_id),
FOREIGN KEY(student_id) REFERENCES Students(student_id)
);
"""


def main() -> None:
print(f"Using DB at: {DB_PATH}")
conn = sqlite3.connect(DB_PATH)
try:
cur = conn.cursor()
cur.execute(DDL)
conn.commit()
print("✅ AfterHoursRequests table created (or already existed).")
finally:
conn.close()


if __name__ == "__main__":
main()
64 changes: 64 additions & 0 deletions scripts/add_due_date_column.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
"""
Migration script to add due_date column to Grades table.

This fixes the schedule feature database schema issue.
Run this script once to add the due_date column and populate it with sample data.

Usage:
python scripts/add_due_date_column.py
"""

import sqlite3
import sys
from pathlib import Path

# Add parent directory to path to import config
sys.path.insert(0, str(Path(__file__).parent.parent))

from config.settings import DB_PATH


def migrate():
"""Add due_date column to Grades table."""
print(f"Connecting to database: {DB_PATH}")
conn = sqlite3.connect(DB_PATH)
cursor = conn.cursor()

try:
# Check if column already exists
cursor.execute("PRAGMA table_info(Grades)")
columns = [column[1] for column in cursor.fetchall()]

if 'due_date' in columns:
print("✓ due_date column already exists in Grades table")
return

# Add due_date column
print("Adding due_date column to Grades table...")
cursor.execute("ALTER TABLE Grades ADD COLUMN due_date TEXT")

# Populate with sample data (7 days after assignment date)
print("Populating sample due dates...")
cursor.execute("""
UPDATE Grades
SET due_date = date(date_assigned, '+7 days')
WHERE assignment_name LIKE '%Exam%'
OR assignment_name LIKE '%Quiz%'
OR assignment_name LIKE '%Assignment%'
OR assignment_name LIKE '%Project%'
""")

conn.commit()
print("✓ Migration completed successfully!")
print("✓ The schedule feature should now work without errors")

except Exception as e:
conn.rollback()
print(f"✗ Migration failed: {e}")
raise
finally:
conn.close()


if __name__ == "__main__":
migrate()
Loading