-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conflict of ID between blocs in workspace and toolbox #28
Comments
You mean when creating a variable with the workspace editor of a blockly task on inginious. Also, if I remember what you told me, for the proposed quickfix to work, you need to create the workspace first and the toolbox is generated by the facotry or something like that? For the fix, my understanding is the actual factory used in inginious' task editor use old blockly js (here:https://github.com/UCL-INGI/INGInious-problems-blockly/blob/c8e30a5013260d2f649cdcf73d1b5573c8bd3004/inginious-problems-blockly/templates/editbox_blockly_templates.html#L101) the js files are 4 years old and have been copied here https://github.com/UCL-INGI/INGInious-problems-blockly/tree/master/inginious-problems-blockly/static/blocklyfactory but we should use the ones in the blockly submodule (in |
Yes I forgot to specify that indeed.
Yes, the workspace factory proposes that you store the generated blocs of the workspace into categories in the toolbox, if you do not accept the toolbox is not created along (also the google factory glitches a bit)
Thanks for the clarification, my message was unclear here as well |
There is high chance they were not modified, even if I remember having imported them from the old repo without any further check. This made me realize there is no copyright mention in those files (happily the license at least is OK). That would be worth updating them. @Drumor I see the |
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
The text was updated successfully, but these errors were encountered: