[WIP] feat(api): Integration of FCC Proper endpoints and Dynamic Student Data #576
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.
Co-Authored by: @utsab
Co-Authored by: @CarlyAThomas
Co-Authored by: @ZhenyuYu1
Checklist:
Update index.md)Update to #548
Description
This PR is an update that branches off of the changes mentioned in PR #549.
Since #549 was created, the classroom team has discussed in detail the workflows involved in retrieving student data from the base freeCodeCamp application, and we've since updated the API endpoints (PR #62063) on freeCodeCamp.
This PR goes over the workflow for pulling student's data from the
get-user-dataendpoint in freeCodeCamp, then processing that data against a mapping of every challenge ID to its related metadata, before displaying it in the app.What is blocking this PR:
Important: This issue won't be able to pass the checks because there's an unresolved TODO comment. This TODO comment refers to an
import prismaline inapi_proccesor.js, which causes the app to break if left in. If removed, the app will work fine, as prisma has been imported elsewhere and Next.js allows it to work inapi_proccesor.js. But ESLint rules require that prisma is explicitly imported inapi_proccesor.jssince we're using it in the file.PR #567 works to solve this issue. After #567 is merged, we can come back to this PR and make necessary edits.
Important: This issue also requires that the endpoints are set up and available on FreeCodeCamp Proper. For now, we have a PR to set this up (PR #62063). However, until this PR is merged, testing this will require that you set up FCC Proper locally and add the changes mentioned in this PR. (Additionally, comment out '
, isClassroomAccount: true' in line 40 and 'isClassroomAccount: true' in line 80. The Classroom Account permissions in PR #62891 setting has not been implemented yet).Important: The
challengeMap.jsonfile is intended to be a comprehensive mapping of every freeCodeCamp challenge ID to the challenge's name, block, and superblock. The logic for fetching student data and validating it against this map assumes that thechallengeMap.jsonis populated and up-to-date.PR #574 works to populate this challenge map from freeCodeCamp's curriculum GraphQL endpoints.
Important: The logic for fetching student data assumes that each student in the classroom has already been onboarded onto the Classroom app. Thus, each student will need to have accepted a Classroom join link from their teacher, then linked their existing FreeCodeCamp Account, with the Classroom Account permission set up(PR #62891).
The full onboarding flow will be implemented in a future PR. However, for testing this data, developers will need to manually set up each student in their prisma studio instance.