Exercise Platform for the OCaml MOOC

This site is a demo for the programming environment used during the first session of the OCaml MOOC. The MOOC was run on the FUN platform, which runs an Open edX software stack. The environment was originally tailored for this usage, this demo is a quick adaptation that runs independently.

Features

This all-in-browser exercise environment is based on the js_of_ocaml compiler and the original OCamlPro's TryOCaml. It adds a full-featured code editor (based on Ace) and an in-browser grading system that provides detailled reports to the students.

The text editor includes visual error reporting. It also embeds ocp-indent in order to provide a forced-indentation mode. Both features help beginners to better understand the OCaml syntax and scoping errors!

The in-browser grader is able to run unit-tests on student code (including some randomly generated tests), and to provide a detailled report together with a grade. It is also able to introspect the abstract syntax tree of student code, for instance to forbid some patterns or to suggest stylistic improvements.

The exercise environment also includes an improved TryOCaml toplevel. It is now executed into its own Web-Worker (an isolated thread), which allows to keep the UI reactive when a student write writes a looping function, or a function that floods the standard output.

Development status

The code is published as it was at the end of the first MOOC session, and, for the moment, we do not have the resources to manage a public git repository with a bug tracker, nor to review external contributions. However, the project will receive upgrades for the next OCaml MOOC sessions, and meanwhile if you intend to reuse this project we are open to collaboration. Don't hesitate to contact OCamlPro for more details.