Skip to content

Replace placeholder columns with real Status, Recipients, and Learner Progress data on Courses list#14667

Open
rtibblesbot wants to merge 2 commits into
learningequality:developfrom
rtibblesbot:issue-14646-288e83
Open

Replace placeholder columns with real Status, Recipients, and Learner Progress data on Courses list#14667
rtibblesbot wants to merge 2 commits into
learningequality:developfrom
rtibblesbot:issue-14646-288e83

Conversation

@rtibblesbot
Copy link
Copy Markdown
Contributor

@rtibblesbot rtibblesbot commented Apr 30, 2026

Summary

The Courses list table had three columns — Status, Recipients, and Learner Progress — hardcoded as '—' for all rows. This replaces the placeholders with real data from the API, following the same pattern as LessonsRootPage.vue.

References

Fixes #14646. Tally shape and StatusSummary usage pattern from #14614.

Reviewer guidance

To verify:

  1. Log in as a coach or admin and navigate to Coach → [Class] → Courses
  2. Status column should show a phase icon + label (grey dot "Not started" for all unactivated courses)
  3. Recipients column should show group names, individual learner names, or "Entire class"
  4. Assign a course to groups/learners and activate a pre-test from the Course Summary page — Status should show "Pre-test running · Unit N" with a clock icon, and Learner Progress should show a tally

Risky areas:

  • _fetch_most_recent_tests (viewsets.py:383): ordering selects the open test first; among closed tests, it picks the one on the latest unit by lft, and for the same unit "post" < "pre" alphabetically gives post-test priority. Worth verifying this ordering handles a course where both pre- and post-tests for a unit are closed correctly.
  • MasteryLog deduplication in consolidate() (viewsets.py:551): complete=True wins over False when a learner has multiple logs for the same content. Verify with a learner who has completed and then re-attempted a test.

Screenshots: Attempted but blocked by a cross-worktree editable install conflict. Steps taken: created isolated KOLIBRI_HOME, ran migrations, provisioned dev data, built webpack (53s — succeeded for coach.app but learn.app and pdf_viewer.main failed due to unchecked-out Git LFS files). Navigation produced "Webpack Error" because importlib.resources.files('kolibri.plugins.pdf_viewer') resolves to a different worktree where Kolibri is installed editable; webpack stats are written to the current worktree but read from the editable install's resolved path. Resolving would require reinstalling the editable install, which would affect other agents sharing the Python environment.

AI usage

Implemented with Claude Code following a spec in PLAN/index.md. Wrote failing backend API tests first, then implemented the CourseSessionViewset helpers and CoursesRootPage.vue component changes. Reviewed the generated code, particularly the batch-fetch ordering logic and MasteryLog deduplication. Ran pytest and Jest test suites to verify correctness.


@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly

How was this generated?
  • Ran pre-flight CI checks (lint, format, tests) and verified all pass
  • Rebased onto the target branch and resolved any conflicts
  • Reorganized commit history into clean, logical commits
  • Audited the diff to ensure only issue-relevant files are changed
  • Built PR body from the repository's PR template with evidence blocks

status

@github-actions github-actions Bot added DEV: backend Python, databases, networking, filesystem... APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend SIZE: large labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 1, 2026

@rtibblesbot rtibblesbot marked this pull request as ready for review May 1, 2026 00:52
@rtibbles rtibbles changed the base branch from release-v0.19.x to develop May 12, 2026 20:11
Copy link
Copy Markdown
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target branch has been updated, both on this PR, and on the issue, to now be develop. Please rebase the PR accordingly.

@rtibblesbot rtibblesbot force-pushed the issue-14646-288e83 branch from cb33719 to 6b1656f Compare May 12, 2026 22:57
@rtibblesbot
Copy link
Copy Markdown
Contributor Author

Rebased onto develop. The spec file conflict required reconciling the branch's new column data tests with develop's auto-mock pattern — replaced the manual mock setup and stubs with jest.mock auto-mocks for both useCourses and useClassSummary, and rewrote the column assertions as text-based queries using translation keys to comply with the project's no-stubs and no-hardcoded-strings lint rules. All 12 tests pass.

@rtibblesbot rtibblesbot force-pushed the issue-14646-288e83 branch from 6b1656f to ed03832 Compare May 12, 2026 23:18
@github-actions github-actions Bot added the DEV: dev-ops Continuous integration & deployment label May 29, 2026
@rtibblesbot rtibblesbot force-pushed the issue-14646-288e83 branch from a7e600a to ed03832 Compare May 29, 2026 18:37
@rtibblesbot
Copy link
Copy Markdown
Contributor Author

Rebased onto develop — PR now targets develop and the branch is up to date.

rtibblesbot and others added 2 commits May 29, 2026 11:58
…SessionViewset

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… Progress data

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rtibblesbot rtibblesbot force-pushed the issue-14646-288e83 branch from ed03832 to 3f41f56 Compare May 29, 2026 19:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: backend Python, databases, networking, filesystem... DEV: dev-ops Continuous integration & deployment DEV: frontend SIZE: large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update course summary page to have accurate progress and recipients information

2 participants