Comprehensive guide to using QTI Migrator effectively.
What is QTI Migrator?
QTI Migrator is a command-line tool designed to help educators and developers migrate Question and Test Interoperability (QTI) content between different versions and formats.
Key Benefits
- Version Migration: Convert between QTI 1.2, 2.0, 2.1, 2.2, and 3.0
- Format Support: Handle XML, JSON, and Common Cartridge formats
- Batch Processing: Process multiple files or entire directories
- Validation: Verify QTI content integrity before and after migration
- Cross-Platform: Works on Windows, macOS, and Linux
Quick Start
# Validate a QTI file
qti-migrator validate assessment.xml
# Convert QTI 1.2 to 2.1
qti-migrator convert --input quiz.xml --output quiz_v21.xml --from qti12 --to qti21
Command Reference
Global Options
--help, -h
- Show help information
--version, -v
- Show version information
--verbose
- Enable verbose output
--quiet
- Suppress output except errors
convert
Convert QTI content between versions and formats.
qti-migrator convert [options] --input FILE --output FILE
--input, -i FILE
- Input file path (required)
--output, -o FILE
- Output file path (required)
--from VERSION
- Source QTI version (auto-detected if not specified)
--to VERSION
- Target QTI version (required)
--format FORMAT
- Output format: xml, json, cc (default: xml)
validate
Validate QTI content against specification schemas.
qti-migrator validate [options] FILE
--version VERSION
- QTI version to validate against
--schema FILE
- Custom schema file
batch
Process multiple files in batch mode.
qti-migrator batch [options] --input-dir DIR --output-dir DIR
--input-dir DIR
- Input directory
--output-dir DIR
- Output directory
--pattern GLOB
- File pattern to match (default: *.xml)
--to VERSION
- Target QTI version
Usage Examples
Basic Conversion
# Convert a single assessment from QTI 1.2 to 2.1
qti-migrator convert -i old_quiz.xml -o new_quiz.xml --from qti12 --to qti21
# Auto-detect source version and convert to QTI 3.0
qti-migrator convert -i assessment.xml -o assessment_v3.xml --to qti30
Batch Operations
# Convert all XML files in a directory
qti-migrator batch --input-dir ./assessments --output-dir ./converted --to qti21
# Process only specific files
qti-migrator batch --input-dir ./tests --output-dir ./updated --pattern "*_test.xml" --to qti22
Validation
# Validate against auto-detected version
qti-migrator validate quiz.xml
# Validate against specific QTI version
qti-migrator validate --version qti21 assessment.xml
Format Conversion
# Convert QTI to JSON format
qti-migrator convert -i quiz.xml -o quiz.json --to qti21 --format json
# Create Common Cartridge package
qti-migrator convert -i assessment.xml -o package.zip --to qti21 --format cc
Troubleshooting
Common Issues
Schema Validation Errors
Problem: File fails validation with schema errors.
Solution: Use --verbose
flag to see detailed error messages:
qti-migrator validate --verbose problematic_file.xml
Unsupported QTI Version
Problem: "Unsupported QTI version" error.
Solution: Check supported versions and specify explicitly:
qti-migrator convert -i file.xml -o output.xml --from qti12 --to qti21
Media Files Missing
Problem: Referenced images or media files not found.
Solution: Ensure all referenced files are in the same directory or use absolute paths.
Getting Help
- Run
qti-migrator --help
for command-specific help
- Use
--verbose
flag for detailed processing information
- Check the GitHub repository for issue reporting and documentation
- Review QTI specification documentation for format requirements