Skip to content

[Levelbuilder] Navigating the Blockly Workspace Editors

Ha Nguyen edited this page Apr 25, 2019 · 2 revisions

Navigating the Blockly Workspace Editors

Blockly levels have several different UI editors that can be accessed via the Admin Box. These let you change the setup for the solution, toolbox, start, recommended, required, and initialization blocks.

How To Use the Editors

The UI for these editors uses the same drag-and-drop workspace as the levels, so you'll create all of your edits in the workspace. In order to save your changes in these editors, click the run button. You should see a pop-up that says "You successfully saved the blocks!"

Alternatively, you can change the XML of these blocks directly in the general level editor.

Note: You must have levelbuilder privileges to access these options.

Solution Blocks Editor

URIs To Know:

Access the Solution:

/levels/{level ID}/solution=true?

Edit the Solution:

/levels/{level ID}/edit_blocks/solution_blocks

This editor changes the teacher facing solution. The user's code itself will not actually be validated against this.

___________________________________________________________________________

Start Blocks Editor

URIs To Know:

Edit the Start Blocks:

/levels/{level ID}/edit_blocks/start_blocks

This editor changes what starter code, or start blocks, show up in the level.

To modify how a start block behaves, right click on the block when it's in the workspace to see a dropdown of modifications for this block's behavior.

Block Modifier Options:

Duplicate :

Makes a copy of the block.

Disable block:

Disables the block's functions/ability. Feedback from users on older puzzles that used this feature indicated it was very confusing. (Example) This feature is rarely used now.

Delete block :

Deletes the block.

Make invisible to users :

Hides the block from the users view. Helpful for having a function run in the background.

Make undeletable to users :

Keeps users from being able to delete block from the workspace.

Make immovable to users :

Keeps users from dragging this block. This is particularly useful for keeping students from being able to move the when run block from the workspace.

Disable next connection:

Removes the connecting area at the bottom of a block.

Make uneditable :

Makes blocks uneditable. This affects any block where the user could change any aspect of it, like setting the dropdown to a different option or changing what's inside a function or behavior.

Lock to parent block:

Locks the block to the block above it that it's attached to, also known as the parent. This keeps users from being able to drag or separate it from its parent.

Set limit:

Sets a limit on how many times this block can be used

___________________________________________________________________________

Toolbox Blocks Editor

URIs To Know:

Edit the Toolbox:

/levels/{level ID}/edit_blocks/toolbox_blocks

This editor changes the blocks that are in the toolbox.

By default, if you just drag the blocks out into the workspace and save, they'll all collect in the toolbox under the general "Blocks" category.

To partition blocks under certain categories, you'll need to use the Category block.

Give the Category block a name, and then line every block you want under that category underneath the block, like in this example:

image

___________________________________________________________________________

Required Blocks Editor

URIs To Know:

Edit the Solution:

/levels/{level ID}/edit_blocks/required_blocks

Required blocks are blocks that must be included in the user's solution for it to be valid. Use this editor to add any blocks that the user's solution should be validated for or include. This is a last-resort feature for validation, because it is preferable to design puzzles so that they can't be perfected without the blocks we want, rather than displaying a "you must use this block" message.

___________________________________________________________________________

Recommended Blocks Editor

URIs To Know:

Edit the Solution:

/levels/{level ID}/edit_blocks/recommended_blocks

Recommended blocks are preferred for solutions, but not required. If recommended blocks are added in this editor, the user's solution won't be validated against these blocks. However, if these blocks are missing from their solution, a hint will come up suggesting that the user use the recommended blocks.

___________________________________________________________________________

Initialization Blocks Editor

URIs To Know:

Edit the Solution:

/levels/{level ID}/edit_blocks/initialization_blocks

Initialization blocks are code that runs before the users, but is invisible to the user. This is useful for when you want to set the stage for a level, but don't want users to be able to see the code. This eliminates the problems associated with setting a block to invisible, such as the blocks getting set out of order.

Clone this wiki locally