 
   confirm: ->
     api.channel.once "course.#{@id}.receive.confirmation.*", @_onConfirmed
-    api.channel.emit("course.#{@id}.send.confirmation", data: {
-      id: @id
-    })
+    api.channel.emit("course.#{@id}.send.confirmation", data: { id: @id })
 
   _onConfirmed:  ({data}) ->
     _.extend(@, data.to.course)

    else
      "#{@name} #{_.first(@periods).name} period"

  isIncomplete: -> not (@name or @to)

  set: (attributes) ->
    _.extend(@, attributes)

    @set(attributes)
    _.bindAll(@, '_onRegistered', '_onConfirmed')

  isRegistered: -> not (@isIncomplete() or @isPending())
  isIncomplete: -> not (@name or @to)
  isPending: ->    @status is "pending"
  cancelJoin: ->   @user.removeCourse(@)

  description: ->
    if @isIncomplete() # still fetching
