Allow missing course IDs in learn-progress allowlist - #64
Open
umarjaved204 wants to merge 1 commit into
Open
umarjaved204 wants to merge 1 commit into
umarjaved204 wants to merge 1 commit into
Conversation
The frontend syncs progress for 109 courses, but only 54 course IDs were allowlisted, so assertCourseId rejected the rest with 400 and signed-in progress for those courses was never saved to the account. Adds the 55 missing IDs, grouped with the existing IDs for each language. ruby-oop is intentionally not included.
|
@umarjaved204 is attempting to deploy a commit to the seno-quantum-coder's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow missing course IDs in the learn-progress allowlist
Problem
The frontend syncs progress, quiz answers, notes and XP for 109 courses, but only 54 course IDs were allowlisted in
src/modules/auth/constants/courseIds.js.For the other 55 courses,
assertCourseIdrejected every progress request with 400 "Unknown courseId". Signed-in learners' progress for those courses was never saved to their account; the frontend silently fell back to browser storage.Affected courses include all PHP (except Fundamentals), Laravel, Go (except Fundamentals), PowerShell, Batchfile, Windows Scripting, Quantum, Q#, most C#, Rust, CSS/HTML and several JS/C++/Ruby courses.
Changes
src/modules/auth/constants/courseIds.js: added the 55 missing IDs, grouped with the existing IDs for each language. No existing IDs removed or renamed.ruby-oopis intentionally not added. That course is currently a copy of Ruby on Rails on the frontend and is being handled separately.Checked
courseIdinLearnerProgressis a plain String with no enum.assertCourseId(progress + annotations) is the only check./learn/progress/mergereported these failures per course inside a 200 response, which is why they went unnoticed.Testing
COURSE_IDS: 109 entries, 109 unique.isValidCourseIdreturns true for all 55 new IDs and all 54 existing IDs;ruby-oopis still rejected with 400.POST /learn/:courseId/progress/engagementreturns 200 for php-oop, laravel-basics, ruby-on-rails, go-fundamentals, powershell-fundamentals, batchfile-projects, quantum-algorithms and qsharp-fundamentals (previously 400).ruby-oopstill returns 400./learn/progress/mergesavesphp-mysqland returns "Unknown courseId" forruby-oop.Known issues (existing, not caused by this PR, to be fixed separately)
withCourserejects overlapping saves with 409 instead of retrying.upsertEngagementEntrymodifies the entry object after it has been added to the array).Deployment
Takes effect for users only after the backend is deployed to Vercel. Deploy this before the matching frontend registry changes.