Skip to main content

Overview

Examination settings control the formal assessment mode of knowledge checks. These settings are found under the examination object in KnowledgeCheckSettingsSchema and provide fine-grained control over exam behavior, timing, and access.

Enable/Disable Examinations

examination.enableExaminations
boolean
default:true
Defines whether users are able to start examination attempts for this check.Set to false to disable the examination mode while keeping practice mode available.
// Example: Disable examinations
examination: {
  enableExaminations: false
}

Time and Date Constraints

examination.startDate
date
required
The start date/time when users can begin taking examinations.Accepts either a Date object or ISO string format. Defaults to current date/time.
// Example: Set exam start date
examination: {
  startDate: "2024-01-15 09:00:00"
}
Reference: KnowledgeCheckSettingsSchema.ts:39
examination.endDate
date | null
default:"1 year from now"
The end date/time after which users can no longer start examinations.When set to null, no end date constraint is applied and the exam remains available indefinitely.
// Example: Set exam deadline
examination: {
  endDate: "2024-12-31 23:59:59"
}

// Example: No end date
examination: {
  endDate: null
}
Reference: KnowledgeCheckSettingsSchema.ts:47
examination.examTimeFrameSeconds
number
default:3600
The maximum duration (in seconds) users have to complete their examination attempt.Constraints:
  • Minimum: 60 seconds (1 minute)
  • Maximum: 18,001 seconds (5 hours)
// Example: 2-hour exam
examination: {
  examTimeFrameSeconds: 7200  // 2 hours
}

// Example: 45-minute exam
examination: {
  examTimeFrameSeconds: 2700  // 45 minutes
}
Reference: KnowledgeCheckSettingsSchema.ts:73

Attempt Limits

examination.examinationAttemptCount
number
default:1
The number of examination attempts users are allowed.Must be at least 1. Unlike practice mode, examination attempts are typically limited.
// Example: Allow 3 exam attempts
examination: {
  examinationAttemptCount: 3
}
Reference: KnowledgeCheckSettingsSchema.ts:80

Access Control

examination.allowAnonymous
boolean
default:true
Specifies whether anonymous (non-authenticated) users can interact with this check.Set to false to require authentication before users can take the examination.
// Example: Require authentication
examination: {
  allowAnonymous: false
}
Reference: KnowledgeCheckSettingsSchema.ts:59

Complete Example

import { KnowledgeCheckSettingsSchema } from '@/src/schemas/KnowledgeCheckSettingsSchema'

const examinationConfig = {
  examination: {
    enableExaminations: true,
    startDate: "2024-06-01 08:00:00",
    endDate: "2024-06-30 23:59:59",
    examTimeFrameSeconds: 5400,  // 90 minutes
    examinationAttemptCount: 2,
    allowAnonymous: false,
    allowFreeNavigation: true,
    questionOrder: "random",
    answerOrder: "random"
  }
}

// Validate the configuration
const validated = KnowledgeCheckSettingsSchema.parse(examinationConfig)

Common Scenarios

Timed Certification Exam

examination: {
  enableExaminations: true,
  examTimeFrameSeconds: 3600,        // 1 hour
  examinationAttemptCount: 1,        // Single attempt
  allowAnonymous: false,             // Require login
  allowFreeNavigation: false,        // Sequential questions
  questionOrder: "random",
  answerOrder: "random"
}

Open Practice Assessment

examination: {
  enableExaminations: true,
  examTimeFrameSeconds: 7200,        // 2 hours
  examinationAttemptCount: 3,        // Multiple attempts
  allowAnonymous: true,              // Open access
  allowFreeNavigation: true,         // Free navigation
  endDate: null                      // No deadline
}

Scheduled Final Exam

examination: {
  enableExaminations: true,
  startDate: "2024-12-15 09:00:00", // Exam week
  endDate: "2024-12-20 17:00:00",
  examTimeFrameSeconds: 10800,       // 3 hours
  examinationAttemptCount: 1,
  allowAnonymous: false,
  allowFreeNavigation: true
}

Build docs developers (and LLMs) love