   if fromWeekId != toWeek.id
     toWeekBlocks = BlockStore.getBlocksInWeek(toWeek.id)
     toWeekBlocks.forEach (b, i) ->
-      if b == block
       b.order = i
       setBlock b, true
   BlockStore.emitChange()
 
-isAddedBlock = (blockId) ->
-  # new block ids are set to Date.now()
-  blockId > 1000000000
-
 setEditableBlockId = (blockId) ->
   _editableBlockIds.push(blockId)
-  _editingAddedBlock = true if isAddedBlock(blockId)
   BlockStore.emitChange()
 
 

addBlock = (week_id) ->
  week_blocks = BlockStore.getBlocksInWeek week_id
  week_blocks = $.grep week_blocks, (block) -> !block.deleted
  block = {
    id: Date.now(),
    is_new: true,
    kind: 0,

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

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