feat(curriculum): add dev-playground superblock and daily challenge types (#60439)

Co-authored-by: Kolade Chris <65571316+Ksound22@users.noreply.github.com>
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Tom
2025-06-04 12:32:25 -05:00
committed by GitHub
parent d4c905e711
commit a2f2ad45c6
70 changed files with 4659 additions and 25 deletions
+2 -1
View File
@@ -277,7 +277,8 @@ export const superBlockToCertMap: {
[SuperBlocks.CodingInterviewPrep]: null,
[SuperBlocks.ProjectEuler]: null,
[SuperBlocks.TheOdinProject]: null,
[SuperBlocks.RosettaCode]: null
[SuperBlocks.RosettaCode]: null,
[SuperBlocks.DevPlayground]: null
};
export type CertSlug = (typeof Certification)[keyof typeof Certification];
+28 -3
View File
@@ -27,6 +27,8 @@ const generic = 24;
const lab = 25;
const jsLab = 26;
const pyLab = 27;
const dailyChallengeJs = 28;
const dailyChallengePy = 29;
export const challengeTypes = {
html,
@@ -57,7 +59,9 @@ export const challengeTypes = {
generic,
lab,
jsLab,
pyLab
pyLab,
dailyChallengeJs,
dailyChallengePy
};
export const hasNoSolution = (challengeType: number): boolean => {
@@ -114,7 +118,9 @@ export const viewTypes = {
[generic]: 'generic',
[lab]: 'classic',
[jsLab]: 'classic',
[pyLab]: 'classic'
[pyLab]: 'classic',
[dailyChallengeJs]: 'classic',
[dailyChallengePy]: 'classic'
};
// determine the type of submit function to use for the challenge on completion
@@ -149,9 +155,28 @@ export const submitTypes = {
[generic]: 'tests',
[lab]: 'tests',
[jsLab]: 'tests',
[pyLab]: 'tests'
[pyLab]: 'tests',
[dailyChallengeJs]: 'tests',
[dailyChallengePy]: 'tests'
};
export const canSaveToDB = (challengeType: number): boolean =>
challengeType === challengeTypes.multifileCertProject ||
challengeType === challengeTypes.multifilePythonCertProject;
export const dailyCodingChallengeTypes = [
challengeTypes.dailyChallengeJs,
challengeTypes.dailyChallengePy
];
export const getIsDailyCodingChallenge = (challengeType: number): boolean =>
dailyCodingChallengeTypes.includes(challengeType);
export const dailyCodingChallengeLanguages = {
[challengeTypes.dailyChallengeJs]: 'javascript',
[challengeTypes.dailyChallengePy]: 'python'
};
export const getDailyCodingChallengeLanguage = (
challengeType: number
): string | undefined => dailyCodingChallengeLanguages[challengeType];
+3 -2
View File
@@ -27,7 +27,8 @@ export enum SuperBlocks {
B1English = 'b1-english-for-developers',
A2Spanish = 'a2-professional-spanish',
RosettaCode = 'rosetta-code',
PythonForEverybody = 'python-for-everybody'
PythonForEverybody = 'python-for-everybody',
DevPlayground = 'dev-playground'
}
/*
@@ -100,7 +101,7 @@ export const superBlockStages: StageMap = {
SuperBlocks.PythonForEverybody
],
[SuperBlockStage.Next]: [],
[SuperBlockStage.Upcoming]: [SuperBlocks.A2Spanish]
[SuperBlockStage.Upcoming]: [SuperBlocks.A2Spanish, SuperBlocks.DevPlayground]
};
Object.freeze(superBlockStages);