WayrApp Backend & Ecosystem Documentation - v1.0.0
    Preparing search index...

    Variable ScoreSchemaConst

    ScoreSchema: ZodNumber = ...

    Score validation schema for assessment and progress tracking

    Validation schema for score values used in quizzes, exercises, and assessments throughout the language learning platform. This schema enforces a 0-100 range that aligns with percentage-based scoring systems and provides consistent score representation across all assessment types.

    The 0-100 range provides intuitive percentage-based scoring that users can easily understand while maintaining compatibility with various grading systems and progress calculations. The schema ensures integer values for consistent score display and comparison operations.

    // Exercise completion with score
    const ExerciseResultSchema = z.object({
    exerciseId: z.string().uuid(),
    score: ScoreSchema,
    timeSpent: TimeSecondsSchema,
    attempts: z.number().int().min(1)
    });
    // Quiz grading validation
    const QuizGradeSchema = z.object({
    quizId: z.string().uuid(),
    userId: z.string().uuid(),
    finalScore: ScoreSchema,
    passingScore: ScoreSchema
    });