[QTI] Publish QTI assessments with the qti_v2 preset

Abierto
#6,479 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript, python

Línea de trabajo

Start by reading the listed preset references in utils/assessment/qti/archive.py, utils/publish.py, utils/import_tools.py, and utils/recommendations.py, then check frontend/shared/leUtils/FormatPresets.js and the linked le-utils release. Trace publish, republish, restore, and recommendation flows against the acceptance criteria; done means each criterion is covered, including restoring legacy qti files and removing them on republish of an unedited node.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

DEV: backend

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

Overview

Studio should publish every QTI assessment (exercises, units and surveys) with the new qti_v2 preset instead of qti. Then Kolibri versions that can't render qti_v2 fall back to the Perseus file. Part of #6478.

Complexity: Medium
Target branch: unstable

Context

Places that hard-code format_presets.QTI_ZIP:

  • utils/assessment/qti/archive.py: QTIExerciseGenerator.preset
  • utils/publish.py: the stale-preset cleanup in recurse_nodes, the mixed-node exercise bit in create_associated_file_objects, and create_kolibri_assessment_metadata, which reads item ids from the QTI manifest and otherwise falls back to hex ids that don't match either archive
  • utils/import_tools.py: restoring QTI items from a published channel
  • utils/recommendations.py: the map from content kind to presets
  • frontend/shared/leUtils/FormatPresets.js: generated from le-utils
The Change
  • Every QTI file Studio publishes (exercises, units and surveys) should use qti_v2. The Perseus dual-publish rules don't change.
  • Republishing a node whose earlier publish created a qti file should remove that file, so the channel ships only qti_v2. This includes nodes that haven't been edited since.
  • Item ids in assessment metadata, the exercise bit on mixed nodes, and recommendations should all work from the qti_v2 file.
  • Restoring a published channel should read qti_v2 files and still read qti files from channels published before this change.
  • Bump le-utils to the release from learningequality/le-utils#262.
Out of Scope
  • The editor warning for exercises only visible on 0.21+ (#6480)
  • Changing which questions get a Perseus archive
Acceptance Criteria
General
  • Publishing a QTI exercise, unit or survey produces a qti_v2 file and no qti file
  • Republishing a channel removes qti files that earlier publishes created, including on nodes that weren't edited
  • AssessmentMetaData.assessment_item_ids match the item ids in both the qti_v2 package and the Perseus archive
  • On a mixed node, the qti_v2 file's included_presets includes the exercise bit
  • Restoring a published channel recovers QTI items from both qti_v2 and qti files
  • The qti_v2 FormatPreset exists in Studio after deploy, and the frontend preset constants include it
Testing
  • Tests cover each criterion above, including a republish of an unedited node that has a qti file

AI usage

Claude found the places that hard-code the qti preset in Studio's publish and restore code and drafted this issue, which I then checked and corrected for accuracy.

Lenguaje dominante
JavaScript
Estrellas
214
Forks
327
Merge medio
17 h 5 min
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de learningequality/studio

Todos los issues de learningequality/studio

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.