Const
// Standard proficiency levels
const proficiencyLevels = [
{
id: 'beginner-a1',
code: 'A1',
name: 'Beginner Level 1',
order: 1
},
{
id: 'beginner-a2',
code: 'A2',
name: 'Beginner Level 2',
order: 2
},
{
id: 'intermediate-b1',
code: 'B1',
name: 'Intermediate Level 1',
order: 3
}
];
// Level creation in course structure
router.post('/courses/:courseId/levels',
validate({ body: LevelSchema }),
async (req, res) => {
const levelData = req.body; // Validated level data
const level = await levelService.create(req.params.courseId, levelData);
res.status(201).json({ level });
}
);
Level validation schema for course difficulty and progression levels
Validation schema for course levels that represent different difficulty stages or proficiency levels within a language learning course. Levels provide structured progression paths for learners, organizing content from beginner to advanced stages while maintaining proper sequencing and identification within the course hierarchy.
The level schema enforces proper identification through URL-safe ID formatting, provides short codes for easy reference and display, includes descriptive names for user interfaces, and maintains proper ordering for sequential progression through the learning material.
Educational structure considerations include support for common proficiency frameworks (A1, A2, B1, B2, C1, C2), flexible naming that accommodates various pedagogical approaches, and ordering systems that support both linear and branching learning paths.