Skip to main content

Overview

Knowledge check settings control the overall behavior and accessibility of your knowledge assessments. These settings are defined in the KnowledgeCheckSettingsSchema and apply to both practice and examination modes.

General Settings

id
string
required
Unique identifier for the knowledge check settings. Automatically generated as a UUID if not provided.
// Auto-generated in KnowledgeCheckSettingsSchema.ts:8
id: "550e8400-e29b-41d4-a716-446655440000"
shareAccessibility
boolean
default:false
Defines whether this check is publicly accessible and discoverable by users.When set to true, users can find and access this knowledge check without direct invitation.
// Example: Make check publicly discoverable
shareAccessibility: true

Question and Answer Ordering

These settings are configured under the examination object but apply to both practice and examination modes.
examination.questionOrder
enum
default:"random"
Defines how questions are ordered during practice and exams.Options:
  • create-order - Questions appear in the order they were created
  • random - Questions are randomly shuffled for each attempt
// Example: Show questions in creation order
examination: {
  questionOrder: "create-order"
}
examination.answerOrder
enum
default:"random"
Defines how answer options are ordered during practice and exams.Options:
  • create-order - Answers appear in the order they were created
  • random - Answers are randomly shuffled for each attempt
// Example: Randomize answer options
examination: {
  answerOrder: "random"
}
examination.allowFreeNavigation
boolean
default:true
Specifies whether users can switch between questions freely or must answer them sequentially.When set to false, users must answer questions in order and cannot skip ahead or return to previous questions.
// Example: Enforce sequential question answering
examination: {
  allowFreeNavigation: false
}

Schema Reference

The complete settings schema is defined in: ~/workspace/source/src/schemas/KnowledgeCheckSettingsSchema.ts:7
export const KnowledgeCheckSettingsSchema = z.object({
  id: z.string().uuid().default(() => getUUID()),
  practice: z.object({ /* ... */ }),
  examination: z.object({ /* ... */ }),
  shareAccessibility: z.boolean().default(false)
})

Validation

The schema provides utility functions for validation:
import { 
  validateKnowledgeCheckSettings, 
  safeParseKnowledgeCheckSettings 
} from '@/src/schemas/KnowledgeCheckSettingsSchema'

// Validate settings
const isValid = validateKnowledgeCheckSettings(settings)

// Safe parse with error handling
const result = safeParseKnowledgeCheckSettings(rawSettings)
if (result.success) {
  console.log(result.data)
}

Build docs developers (and LLMs) love