feat(Curriculum): Add new BlockType tags for the Language Curricula Chapter Based Certifications (#62156)

Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
Nielda Karla
2025-09-11 17:10:01 -03:00
committed by GitHub
parent aba1776fcd
commit 28f7417bdf
7 changed files with 44 additions and 7 deletions
@@ -647,7 +647,10 @@
"lab": "Lab", "lab": "Lab",
"review": "Review", "review": "Review",
"quiz": "Quiz", "quiz": "Quiz",
"exam": "Exam" "exam": "Exam",
"warm-up": "Warm-up",
"learn": "Learn",
"practice": "Practice"
} }
}, },
"donate": { "donate": {
@@ -61,6 +61,21 @@
color: var(--quaternary-color); color: var(--quaternary-color);
} }
.block-label-warm-up {
border-color: var(--yellow-color);
color: var(--yellow-color);
}
.block-label-learn {
border-color: var(--highlight-color);
color: var(--highlight-color);
}
.block-label-practice {
border-color: var(--success-color);
color: var(--success-color);
}
.block-header { .block-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
+4 -1
View File
@@ -137,7 +137,10 @@ const schema = Joi.object().keys({
'lecture', 'lecture',
'review', 'review',
'quiz', 'quiz',
'exam' 'exam',
'warm-up',
'learn',
'practice'
).required(), ).required(),
otherwise: Joi.valid(null) otherwise: Joi.valid(null)
}), }),
+4 -1
View File
@@ -21,7 +21,10 @@ const schema = Joi.object()
'lecture', 'lecture',
'review', 'review',
'quiz', 'quiz',
'exam' 'exam',
'warm-up',
'learn',
'practice'
), ),
isUpcomingChange: Joi.boolean().required(), isUpcomingChange: Joi.boolean().required(),
dashedName: Joi.string().regex(slugRE).required(), dashedName: Joi.string().regex(slugRE).required(),
+5 -1
View File
@@ -4,7 +4,11 @@ export enum BlockTypes {
lab = 'lab', lab = 'lab',
review = 'review', review = 'review',
quiz = 'quiz', quiz = 'quiz',
exam = 'exam' exam = 'exam',
/* The tags below refer to the Language Curricula chapter based certifications*/
warmup = 'warm-up',
learn = 'learn',
practice = 'practice'
} }
export enum BlockLayouts { export enum BlockLayouts {
@@ -1,4 +1,7 @@
const Joi = require('joi'); const Joi = require('joi');
const {
chapterBasedSuperBlocks
} = require('../../../shared/config/curriculum');
const blockSchema = Joi.object({}).keys({ const blockSchema = Joi.object({}).keys({
desc: Joi.array().min(1), desc: Joi.array().min(1),
@@ -40,9 +43,12 @@ const blockSchema = Joi.object({}).keys({
'lab', 'lab',
'review', 'review',
'quiz', 'quiz',
'exam' 'exam',
'warm-up',
'learn',
'practice'
).when('superBlock', { ).when('superBlock', {
is: 'full-stack-developer', is: chapterBasedSuperBlocks,
then: Joi.required(), then: Joi.required(),
otherwise: Joi.optional() otherwise: Joi.optional()
}), }),
@@ -45,7 +45,10 @@ const blockSchema = Joi.object().keys({
'lab', 'lab',
'review', 'review',
'quiz', 'quiz',
'exam' 'exam',
'warm-up',
'learn',
'practice'
).when('superBlock', { ).when('superBlock', {
is: chapterBasedSuperBlocks, is: chapterBasedSuperBlocks,
then: Joi.required(), then: Joi.required(),