aroberge / reeborg

Enhanced Karel-the-robot clone
http://reeborg.ca/reeborg.html
Other
47 stars 36 forks source link

automatic saving per world #427

Closed aroberge closed 6 years ago

aroberge commented 6 years ago

Currently, when a program is run without syntax error, the contents of the editor and of the library are saved in localStorage, so that it can be retrieved as a starting point when a new browser session is started.

A request has been made to automatically save the content when a world has been successfully solved with local storage being done on a per-world basis, and so that it can be automatically retrieved when a user loads the world. This would be helpful in a classroom situation where a student could show to a teacher the work that she has done, without having to explicitly save each individual solution on their computer.

Further thoughts

Contrary to what I wrote above, the solution should not be automatically retrieved. Suppose that we have two worlds (w1, w2) of increasing complexity. The student is asked to write a solution for w1. Then, she has to write a solution for w2 that would also work with w1. After writing a solution for w2, if the student were to switch to w1, with automatic retrieval, the solution for w2 would be replaced by that for w1 ... and could thus not be tested.