Skip to main content

tracklms-to-qti-results

Convert Track LMS exports into QTI 3.0 Results Reporting artifacts.

Status

Converter and CLI are available.

Setup

  • Python 3.11+
  • Create and activate a virtual environment
  • Install dev tools: python -m pip install -r requirements-dev.txt

Environment variables

None.

Specs

Agent rules (AGENTS.md)

This repository uses composed agent rules.

node agent-rules-tools/tools/compose-agents.cjs

Planned tech

  • Python + Pydantic

Development

Tests

python -m unittest discover -s tests

Lint

python -m ruff check .

Security audit

python -m pip_audit -r requirements-dev.txt

Usage

from pathlib import Path

from tracklms_to_qti_results import convert_csv_text_to_qti_results

csv_text = Path("tracklms-export.csv").read_text(encoding="utf-8")
results = convert_csv_text_to_qti_results(csv_text, timezone="Asia/Tokyo")

for result in results:
    output_path = Path(f"assessmentResult-{result.result_id}.xml")
    output_path.write_text(result.xml, encoding="utf-8")

Notes:

  • One XML document is produced per input row (resultId).
  • The timezone parameter applies to startAt/endAt conversion.
  • Use allowed_statuses to include only specific Track LMS statuses.

CLI

python run_cli.py <input.csv|-> \
  [--timezone Asia/Tokyo] \
  [--output <output_dir|->] \
  [--assessment-test <assessment-test.qti.xml>] \
  [--only-status <status>] \
  [--dry-run] \
  [--json] \
  [--yes]

Notes:

  • Run from the repository root; run_cli.py bootstraps src/ automatically.
  • If your environment allows, python -m tracklms_to_qti_results ... also works.
  • Use - instead of a file path to read CSV data from stdin.
  • If --output/--out-dir is omitted, outputs go to <input_dir>/qti-results (or ./qti-results when reading stdin).
  • Use --output - to emit a single XML document to stdout.
  • Use --dry-run to preview planned outputs without writing files.
  • Use --json to emit a machine-readable summary to stdout.
  • Use --yes/--force to overwrite existing files without prompting.
  • Output files are written as assessmentResult-<resultId>.xml.
  • Use --assessment-test <path> to include rubric-based scoring results.
    • Descriptive items set all rubric criteria to false.
    • Choice and fill-in-the-blank items set all criteria to true when q{n}/score is non-zero.
    • itemResult identifiers follow the assessment test item order.
  • Use --only-status multiple times to include multiple statuses (example: --only-status Completed --only-status DeadlineExpired).

Versioning

This project follows Semantic Versioning.

Breaking changes include (but are not limited to):

  • Changes to CLI flags or defaults that alter outputs or behavior.
  • Changes to input/output formats or required columns.
  • Changes to public Python API signatures or return types.

Release

  1. Update CHANGELOG.md with a new version section and migration notes for breaking changes.
  2. Update src/tracklms_to_qti_results/version.py.
  3. Run python -m pip_audit -r requirements-dev.txt and address critical issues.
  4. Run python -m build.
  5. Run python -m twine check dist/*.
  6. Tag the release (example: v1.2.3) and push the tag.
  7. Create a GitHub Release with notes based on CHANGELOG.md.
  8. Publish to PyPI with python -m twine upload dist/*.

Metadata

Release files for tracklms-to-qti-results 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracklms-to-qti-results 0.2.1
File Size Uploaded
tracklms_to_qti_results-0.2.1.tar.gz 20.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracklms-to-qti-results 0.2.1
File Interpreter ABI Platform
tracklms_to_qti_results-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 35.5 kB

Release files / tracklms_to_qti_results-0.2.1.tar.gz

Download URL tracklms_to_qti_results-0.2.1.tar.gz
Size 20.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0ecd43e544fde03abb7f54376fa88957f76b517428619a26c6f67947e81f6bb0
BLAKE2b-256 checksum
How to use checksums
c9b1f8eae6a26b0a8933f5409b9d3ec6985bc6b2ede51ea0d279a1acf58b1029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / tracklms_to_qti_results-0.2.1-py3-none-any.whl

Download URL tracklms_to_qti_results-0.2.1-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1dc1da3014dec83c3a586c88144da065f070605bb61ca7d7c8284fd9a71a2650
BLAKE2b-256 checksum
How to use checksums
97a90ec9a2c5379a826b300769fc23070ec470f8f166095fea2611360c3dc378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page