Skip to content

2D Parsons problems, i.e. inferring indentationΒ #81

@alexmojaki

Description

@alexmojaki

Follow-up to #53 and #69

Students can now solve Parsons problems instead of writing code, which is great. However these may be more effective (especially for shorter, simpler problems) if they also have to figure out how much each line is indented rather than being given that information. That is, the shuffled lines all start out completely unindented, and students need to correctly adjust them.

An ideal user interface for this can be seen in https://runestone.academy/runestone/static/instructorguide/Directives/mixedUp.html#indenting-the-blocks where the indentation can be set by dragging the block horizontally and it snaps to indentation guides. Runestone uses their own custom version of https://js-parsons.github.io/ which has the same feature. I'm not using js-parsons because it's undocumented, unmaintained, and jQuery, but if someone wants to try then they can.

The simplest way I can think of to reimplement this feature in futurecoder is to add a little button or two to each code block which the user can click to adjust the indentation. This seems easier than dealing with the intricacies of drag and drop.

We will also need to disable this for certain exercises where the solution is already complicated enough, but that's the easy part of this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    frontendThe Javascript user interface

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions