     order: week_blocks.length,
     duration: null
   }
-  setBlock block
-  setEditableBlockId(block.id)
 
 removeBlock = (block_id) ->
   delete _blocks[block_id]
-  _editingAddedBlock = false
   BlockStore.emitChange()
 
 insertBlock = (block, toWeek, targetIndex) ->

_persisted = {}
_trainingModule = {}
_editableBlockIds = []
_editingAddedBlock = false

# Utilities
setBlocks = (data, persisted=false) ->

      .sort((a,b) -> a.order - b.order)
  restore: ->
    _blocks = $.extend(true, {}, _persisted)
    BlockStore.emitChange()
  getTrainingModule: ->
    return _trainingModule
  getEditableBlockId: ->
    return _editableBlockIds
  clearEditableBlockIds: ->
    _editableBlockIds = []
    BlockStore.emitChange()
  cancelBlockEditable: (block_id) ->
    _editableBlockIds.splice(_editableBlockIds.indexOf(block_id), 1)
    BlockStore.emitChange()

, (payload) ->
  data = payload.data
