Blockly has a general-purpose code sandbox which allows a wide range of generic blocks to be used. The results are visible as JavaScript, Python, PHP, Lua, or Dart. It is also multi-lingual, can save and load programs from the cloud, and can execute code:
Although it was intended as a demo for developers, it is unexpectedly being used by a lot of schools. We'd like to know more about how it is being used, so that we can adapt it as a proper scholastic application. Take a look at it, and let us know what we can do to better support you.