samu commited on
Commit
25a84f8
·
1 Parent(s): e4083a9

improved backend

Browse files
backend/__pycache__/main.cpython-311.pyc CHANGED
Binary files a/backend/__pycache__/main.cpython-311.pyc and b/backend/__pycache__/main.cpython-311.pyc differ
 
backend/main.py CHANGED
@@ -451,35 +451,5 @@ async def search_curricula(
451
  status_code=200
452
  )
453
 
454
- @app.get("/content/status/{curriculum_id}")
455
- async def get_content_generation_status(
456
- curriculum_id: str = Path(..., description="Curriculum ID")
457
- ):
458
- """Check content generation status for a curriculum"""
459
- status = await db.get_curriculum_content_status(curriculum_id)
460
- if not status:
461
- raise HTTPException(status_code=404, detail="Curriculum not found")
462
-
463
- # Calculate completion percentage
464
- total_lessons = 25
465
- total_content_types = 3 # flashcards, exercises, simulation
466
- total_expected = total_lessons * total_content_types
467
-
468
- total_generated = (
469
- status['lessons_with_flashcards'] +
470
- status['lessons_with_exercises'] +
471
- status['lessons_with_simulations']
472
- )
473
-
474
- completion_percentage = (total_generated / total_expected) * 100 if total_expected > 0 else 0
475
-
476
- return JSONResponse(
477
- content={
478
- "curriculum_id": curriculum_id,
479
- "status": status,
480
- "completion_percentage": round(completion_percentage, 2),
481
- "is_complete": completion_percentage >= 100
482
- },
483
- status_code=200
484
- )
485
 
 
451
  status_code=200
452
  )
453
 
454
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
455