INGInious / INGInious/problems-blockly

Conflict of ID between blocs in workspace and toolbox

オープン
#28 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
2
フォーク
4
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

workspace と toolbox に同じ変数を作成し、getter、setter、または variable ブロックをドラッグして競合を再現します。plugin が現在使用している factory ファイルを調べ、生成された XML を新しい INGInious factory の出力と比較します。完了条件は、ID の競合なしに toolbox ブロックをドラッグでき、グラフィカルインターフェースから編集可能な状態を維持できることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
frontend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。