Skip to content

teacher dashboard need use course id to determine oz course#8196

Merged
smallst merged 1 commit intomasterfrom
yuqiang/fix-coco-oz-level-number
Jan 22, 2026
Merged

teacher dashboard need use course id to determine oz course#8196
smallst merged 1 commit intomasterfrom
yuqiang/fix-coco-oz-level-number

Conversation

@smallst
Copy link
Copy Markdown
Contributor

@smallst smallst commented Jan 22, 2026

fix ENG-2302
image

Summary by CodeRabbit

  • Refactor
    • Updated level number mapping system to include course-specific identifiers across components
    • Enhanced course type detection logic to better differentiate between course variants in teacher dashboard and player views

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

The changes propagate a courseId parameter throughout the level-number mapping logic across store, utilities, and components. Additionally, Coco mode detection is tightened to exclude Ozaria courses by checking against OZ_COURSE_IDS, and course-detection logic is refactored in teacher-dashboard components to use this constant.

Changes

Cohort / File(s) Summary
Core Store & Utilities
app/core/store/modules/gameContent.js, app/core/utils.js
Updated generateLevelNumberMap action to accept courseId in payload; tightened Coco mode detection to exclude courses in OZ_COURSE_IDS
Play Level Components
ozaria/site/components/play/PagePlayLevel/index.vue, ozaria/site/components/play/PageIntroLevel/index.vue, ozaria/site/components/play/PageUnitMap/common/UnitMapBackground.vue
Added courseId parameter to generateLevelNumberMap calls; initialized courseId from URL query parameter in PagePlayLevel
Teacher Dashboard Helpers
ozaria/site/components/teacher-dashboard/BaseCurriculumGuide/curriculum-guide-helper.js, ozaria/site/components/teacher-dashboard/BaseCurriculumGuide/components/ModuleContent.vue
Updated generateLevelNumberMap function signature to accept and forward courseId parameter
Teacher Dashboard Components
ozaria/site/components/teacher-dashboard/BaseSingleClass/index.vue, ozaria/site/components/teacher-dashboard/BaseSingleClass/table/TableModuleHeader.vue, ozaria/site/components/teacher-dashboard/BaseTeacherDashboard/index.vue
Added isOzCourse computed property; refactored course-detection logic to use OZ_COURSE_IDS instead of global utils.isOzaria(); extended generateLevelNumberMap calls with courseId
Teacher Solution View
app/views/teachers/TeacherCourseSolutionView.js
Added courseId to generateLevelNumberMap dispatch payloads in two locations

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • #7797 — Extends the existing store-based level-number mapping by adding courseId parameter and tightening Ozaria/Coco detection logic
  • #8165 — Introduces exports of OZ_COURSE_IDS and course-ID constants in app/core/utils.js that enable the Ozaria course detection logic in this PR
  • #8190 — Modifies teacher-dashboard course-detection logic using isOzCourse and OZ_COURSE_IDS for distinguishing Ozaria vs. CodeCombat behavior

Suggested reviewers

  • mrfinch
  • adamkecskes

Poem

🐰 A course ID hops through the store,
From utils to components galore,
Ozaria's mapped with Coco care,
Level numbers flow everywhere! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main objective of the changeset: adding courseId parameter throughout the codebase to properly determine Ozaria courses in the teacher dashboard.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • ENG-2302: Authentication required, not authenticated - You need to authenticate to access this operation.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@smallst smallst merged commit aaeaca0 into master Jan 22, 2026
3 checks passed
@smallst smallst deleted the yuqiang/fix-coco-oz-level-number branch January 22, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants