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

@@ -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(),