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

View File

@@ -647,7 +647,10 @@
"lab": "Lab",
"review": "Review",
"quiz": "Quiz",
"exam": "Exam"
"exam": "Exam",
"warm-up": "Warm-up",
"learn": "Learn",
"practice": "Practice"
}
},
"donate": {

View File

@@ -61,6 +61,21 @@
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 {
display: flex;
justify-content: space-between;

View File

@@ -137,7 +137,10 @@ const schema = Joi.object().keys({
'lecture',
'review',
'quiz',
'exam'
'exam',
'warm-up',
'learn',
'practice'
).required(),
otherwise: Joi.valid(null)
}),

View File

@@ -21,7 +21,10 @@ const schema = Joi.object()
'lecture',
'review',
'quiz',
'exam'
'exam',
'warm-up',
'learn',
'practice'
),
isUpcomingChange: Joi.boolean().required(),
dashedName: Joi.string().regex(slugRE).required(),

View File

@@ -4,7 +4,11 @@ export enum BlockTypes {
lab = 'lab',
review = 'review',
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 {

View File

@@ -1,4 +1,7 @@
const Joi = require('joi');
const {
chapterBasedSuperBlocks
} = require('../../../shared/config/curriculum');
const blockSchema = Joi.object({}).keys({
desc: Joi.array().min(1),
@@ -40,9 +43,12 @@ const blockSchema = Joi.object({}).keys({
'lab',
'review',
'quiz',
'exam'
'exam',
'warm-up',
'learn',
'practice'
).when('superBlock', {
is: 'full-stack-developer',
is: chapterBasedSuperBlocks,
then: Joi.required(),
otherwise: Joi.optional()
}),

View File

@@ -45,7 +45,10 @@ const blockSchema = Joi.object().keys({
'lab',
'review',
'quiz',
'exam'
'exam',
'warm-up',
'learn',
'practice'
).when('superBlock', {
is: chapterBasedSuperBlocks,
then: Joi.required(),