INGInious / INGInious/problems-blockly
Conflict of ID between blocs in workspace and toolbox
- Langage dominant
- JavaScript
- Étoiles
- 2
- Forks
- 4
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Reproduisez le conflit en créant la même variable dans le workspace et le toolbox, puis en faisant glisser les blocs getter, setter ou variable. Examinez les fichiers factory actuellement utilisés par le plugin et comparez leur XML généré avec la sortie de la factory plus récente d’INGInious. La tâche est considérée comme terminée lorsque les blocs du toolbox peuvent être glissés sans conflit d’ID tout en restant modifiables via l’interface graphique.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- frontend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100