Skip to main content

Enabling Block Coding for Students

Block Settings allow teachers to turn block coding on or off for students

Written by CodeHS Team
Banner: This is a Free Feature

Block/Text Settings allows you to toggle blocks for a module, lesson, or assignment in one place. You can allow blocks for one section or multiple sections. When blocks are allowed, students can toggle between block and text coding. It is important to note that only certain languages are compatible with block coding.

Languages Compatible with Blocks

  • Karel in JavaScript

  • HTML

  • Coding in Art, Music, or Sports

  • Python Turtle (Blocks) Sandbox programs

    Image demonstrating programming languages compatible with Block Coding in the sandbox

    [Note: switching to text coding isn't an option for "Python Turtle (Blocks)" Sandbox programs]

Courses with Block-Compatible Activities

  • Intro to Computer Science in JavaScript (Karel modules only)

  • AP Computer Science Principles in JavaScript (Karel modules only)

  • Computing Ideas

  • Web Design

  • Intro to Programming with Karel

  • Coding Explorations

  • [Note: block coding is not available with CSS]

Adjusting Block Settings

Access block/text settings for a section:

  1. Click Configure under the Assignments category in the left-hand navigation menu to navigate to the Configure app

  2. From there, click on the Block/Text Settings tab on the top navigation bar

  3. Enable blocks for the entire course, or alternatively you can expand modules and lessons to enable blocks for specific assignments.

Gif demonstrating how to toggle on blocks for modules, lessons, or assignments through the Configure Assignments app.

Setting the module, lesson, or assignment to Yes will allow students to use blocks for the assignments selected.

Students Switching Between Blocks and Text Coding:

If blocks are enabled for a section, students have the option to switch between block and code view. How students can turn blocks on or switch views depends on the type of program:

HTML and JavaScript Karel Programs

In HTML and JavaScript Karel programs, students can click the Blocks icon in the left sidebar, then switch between Blocks and Code using the two buttons that appear:

Screenshot showing how to switch between blocks and text coding. Arrow pointing to Blocks icon in left sidebar. Another arrow pointing to Blocks and Code buttons.

In Code view, the block palette is grayed out. Students get back to blocks by clicking Blocks at the top or pressing Switch to Block Coding to use the palette:

Screenshot showing the two ways to switch back to Block coding from Code view

If the student would like to change their default settings, they can click on the gear icon in the left sidebar of the code editor. From there, they can toggle Code with blocks by default:

Image showing how students can enable block coding by default by toggling "Code with blocks by default"

Coding in Art, Music, or Sports programs

These programs use a dropdown menu next to the Share button in the top-right of the editor. Students switch between block and text coding by selecting blocks or text from the dropdown:

GIF demonstrating how to switch between block and text coding in music/art/sports programs

Python Turtle (Blocks) programs

You can use block coding for Python Turtle programs in the sandbox (not available in Python Turtle Assignments).

To do this, go to the Block Coding filter and select Python Turtle (Blocks) when creating your sandbox program.

Image demonstrating how to create a Python Turtle (Blocks) program

Blocks in the Sandbox

Students can set their block preferences in their Sandbox programs regardless of the section's settings. If the program type is compatible with blocks, students can click the gear icon in the left sidebar of their code editor and toggle on Use block coding:

GIF demonstrating how to enable block coding for a sandbox program


Blocks Limitations

  • Web Page Projects:

    • Limited Image Management: Uploading and organizing images into folders is unavailable via the "New+" button. Only the last uploaded image's URL is accessible.

    • No Folder Creation: Students cannot create folders to organize project files.

  • Custom Sandbox Programs (Teacher-Created):

    • Restricted File Manipulation: Students initially cannot rename or delete files in teacher-owned Sandboxes when using blocks. The necessary drop-down options to rename or delete files are unavailable.

    • Solution: Forking: Students must "Fork" the teacher's program to gain ownership of the Sandbox program and the ability to rename/delete files. After forking, these options become available.

Note: Image/folder limitations apply to Web Page projects. File manipulation restrictions in Sandboxes affect teacher-created programs. Full file management is available in Python and Java projects. For complete file control in Web Page projects and direct file manipulation in teacher-created Sandboxes, students should fork the program or use text-based coding.

Banner: This is a Pro Feature.

Allowing Blocks for Individual Students

  1. From your Roster app, click on the gear icon next to the student's name

  2. Control the settings for modules, lessons, or specific assignments

  3. If you would like to view fewer settings, you can select which settings to edit in the top left menu

Gif demonstrating how to toggle on blocks for an individual student in various modules.


Still have questions? Contact our team at support@codehs.com to learn more!

Did this answer your question?