learningequality / learningequality/studio

[QTI/RTE] QTI package build fails when RTE content contains absolute URLs

Open
#5,959 0 comments 0 reactions 1 assignee View on GitHub

@AlexVelezLl is already working on this.

Since Aug 25, 2026.

bug DEV: backend P1 - important
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.

Observed behavior

The RTE in Studio allows users to add absolute external URLs as links in content. However, when building a QTI package, any RTE content containing an absolute URL causes the build to fail with a validation error.

This is because QTI packages are bundled content and absolute URLs are not allowed — but the editor does not enforce this restriction, so users can author invalid content without any warning, only discovering the issue at build time.

Errors and logs

ValidationError
1 validation error for A
href
  Value error, Absolute URLs not allowed in bundled content: https://studio.learningequality.org/es-es/channels/4f5a35a6f67040e285fe675828ca1075/#/e9ae3052b737401d9f90176bc5e0db37/details/694db41d3d134905841179a6f8166921/questions [type=value_error, input_value='https://studio.learninge...179a6f8166921/questions', input_type=str]

Sentry issue: https://learningequality.sentry.io/issues/7518188687/

Expected behavior

Either the RTE should prevent users from adding absolute URLs when editing content that will be exported as a QTI package, or the build process should handle absolute URLs gracefully (e.g. by stripping them or surfacing a clear user-facing error before the build fails).

User-facing consequences

  • Users can author content with absolute URLs in the RTE without any warning, but the QTI package build fails silently at export time with a technical validation error.
  • There is no way for users to identify which piece of content contains the offending URL without inspecting error logs.

Steps to reproduce

  1. Create an exercise in Studio. Set completion to Survey and add a free response question.
  2. In any RTE field, add a link with an absolute URL (e.g. https://example.com).
  3. Attempt to publish the exercise as a QTI package.
  4. Observe that the build fails with a ValidationError indicating absolute URLs are not allowed in bundled content.

Context

  • The validation is enforced in the QTI export backend (contentcuration/utils/assessment/qti/), which correctly rejects absolute URLs in bundled content.
  • The RTE has no awareness of the QTI export context and applies no such restriction at authoring time.

AI usage

Drafted with Claude Code. Reproduction steps and acceptance criteria were reviewed and confirmed manually.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.