INGInious / INGInious/problems-blockly

Conflict of ID between blocs in workspace and toolbox

Abierto
#28 3 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
2
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When creating a variable with the same name present both in the workspace and the toolbox, a bug will appear when you try to solve the task.
The blocs (getter - setter - variable) from the toolbox cannot be dragged onto the workspace, as there is a conflict of ID.

Error message : Uncaught Error: Variable "test" is already in use and its id is "Gb:rfS?s2I9-yzU+:m4C" which conflicts with the passed in id, "wm||];n1QbzdRrI@1wT|".

However you can resume using those blocs from the toolbox if you first manually change the getter/setter/var to any variable then again to your variable, it seems to reset the ID of the variable in the toolbox to the ID of the variable in the workspace.

A quickfix is to use the online factory from google ( https://blockly-demo.appspot.com/static/demos/blockfactory/index.html ) and after setting up your workspace from it, export the XML. Using this XML on the INGInious platform seems to do the trick.
It's worth noticing that doing so, since it uses hardcoded ID's, prevents any other modification from the graphical interface.

A suggestion to fix this would be to change the path of the factory files currently in use, to the more recent ones present on the INGInious github.

Kind regards

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the conflict by creating the same variable in the workspace and toolbox, then dragging the getter, setter, or variable blocks. Inspect the factory files currently used by the plugin and compare their generated XML with the newer INGInious factory output. Done means toolbox blocks can be dragged without an ID conflict while remaining editable through the graphical interface.

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

Evaluación

Stack tecnológico
javascript
Área
frontend
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.