Khan/canvas-editor — pull request #153 by phleet (2012-05-11 15:55:30+00:00)
Title: Switch to Scatchpad/ScratchpadRevision system from ScratchCode system

The behaviour of the save button is now as follows:

1. If it's a new scratchpad (i.e. URL is /labs/code), create a new scratchpad
and revision with no origin_revision_id and create a the first revision
2. If it's a pre-existing scratchpad

a) If the user is anonymous, the scratchpad is forked (new scratchpad, new
revision, origin_id set.)

b) If the user is logged in, the scratchpad is updated (new revision only) if
the user owns the scratchpad, forked otherwise