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

Exercises #793

cdsmith opened this Issue Jan 4, 2019 · 1 comment


None yet
1 participant
Copy link

cdsmith commented Jan 4, 2019

Although the main goal of CodeWorld is to provide an environment that can be used to write arbitrary programs, there are also cases where it would be useful offer some kind of guided exercises. This is a general issue to track ideas for building guided exercises for CodeWorld.

Specific goals might include:

  • Providing fixed code (not editable, and could be either visible or not or a combination thereof) that is inserted into the student code when they click Run.
  • The possibility for students to either write new definitions, or to write expressions that are substituted into existing definitions in the fixed code.
  • Exercises would disable the project management UI and instead save their state automatically to a fixed location for each user. Most of the bottom bar (Guide, Ask a Question, etc.) would also be disabled to keep the UI simple. The goal would be to make the exercise UI embeddable in an iframe. However, it might also be a good idea to let students open the exercise in the full CodeWorld UI, too, where they can save specific submissions as named projects and access the full UI tools.
  • Perhaps exercises could also customize which debug tools, including the Inspect window, time-traveling debugger, etc., are available.
  • Exercises can set some kind of success state or point score (e.g., number of stars) that can be set by the fixed code to indicate the exercise is completed and scored. This suggests the fixed code needs its own API entry point, like exerciseOf, customized to this use case. It could be somewhat more complex than the main CodeWorld entry points, since it would be targeted at exercise authors instead of students.
  • Exercises should be able to exist in a sequence or playlist, with navigation controls in a side bar. Scores or success in each exercise is visualized in the sidebar. Progress can be gated by succeeding or reaching a target score on the previous exercises. Progress in the sequence is also saved to a student's account.

I'm imagining a URL something like, which would load the more simplified UI (e.g., no project browser) with the exercise set up.

Some challenges include:

  1. If we're modifying the source code to the compiler, the error messages from the compiler also need to be adjusted to match the original. Also, what happens when there's an error message in the fixed code, which is caused by (for example) the student defining something with the wrong type. Also, what about stack traces that include locations in fixed code?
  2. What does the API look like for the exercise to report stuff like success status, points, etc.?

Related issues:

  • #761 becomes much more significant when this feature is implemented.
  • Integrating with the requirements checker in #769 would be an excellent feature. This would also provide a way that requirements could be embedded into the UI without students

@cdsmith cdsmith added the proposal label Jan 4, 2019


This comment has been minimized.

Copy link

cdsmith commented Jan 4, 2019


I wrote this while thinking about how to support something like you're talking about on the CodeWorld side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment