Skip to content

fix: use course_progress for assignment bar with library_content MCQs#23

Closed
choeying-10 wants to merge 1 commit into
ulmo1-migrationfrom
fix/assignment-library-content-progress
Closed

fix: use course_progress for assignment bar with library_content MCQs#23
choeying-10 wants to merge 1 commit into
ulmo1-migrationfrom
fix/assignment-library-content-progress

Conversation

@choeying-10

Copy link
Copy Markdown

Summary

  • Restores assignment progress counting for unit tests that wrap MCQs in library_content, where subsection completion stays at 0.0 on the blocks API.
  • Prefer LMS course_progress (assignments_completed / total_assignments_count) for the Assignments tab and Home assignment-card X/Y bars (Sumac-style).
  • Treat per-assignment green checks as complete when all descendant PROBLEM blocks are 1.0, with fallback MCQ rollup if LMS progress is missing.
  • Scope is Assignments tab + Home assignment card only (All / Videos / lesson drill-down unchanged).

@choeying-10 choeying-10 self-assigned this Jul 14, 2026
@choeying-10 choeying-10 added the bug Something isn't working label Jul 14, 2026
return problems.isNotEmpty() && problems.all { it.completion == 1.0 }
}

fun Block.assignmentCompletion(allBlocks: List<Block>): Double {
@yogeshbhagatcode yogeshbhagatcode deleted the branch ulmo1-migration July 16, 2026 09:32
@yogeshbhagatcode yogeshbhagatcode removed their request for review July 16, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants