     @context.router.transitionTo('viewStats', {courseId, id})
 
   render: ->
-    {id, courseId, clickedSelectProblem, onPublish} = @props
-    {isEditable} = @state
+    {id} = @props
 
-    plan = TaskPlanStore.get(id)
-
-    saveable = not (TaskPlanStore.isPublished(id) or TaskPlanStore.isPublishing(id))
-    isWaiting = TaskPlanStore.isSaving(id) or TaskPlanStore.isPublishing(id) or TaskPlanStore.isDeleteRequested(id)
-    isFailed = TaskPlanStore.isFailed(id)
+    saveable    = not (TaskPlanStore.isPublished(id) or TaskPlanStore.isPublishing(id))
+    isWaiting   = TaskPlanStore.isSaving(id) or TaskPlanStore.isPublishing(id) or TaskPlanStore.isDeleteRequested(id)
+    isFailed    = TaskPlanStore.isFailed(id)
     isPublished = TaskPlanStore.isPublished(id)
 
     <div className='footer-buttons'>
       <SaveButton
         onSave={@onSave}
-        onPublish={@onPublish}
+        onPublish={@props.onPublish}
         isWaiting={isWaiting}
         isSaving={@state.saving}
         isEditable={@state.isEditable}

  componentWillMount: ->
    plan = TaskPlanStore.get(@props.id)
    publishState = PlanHelper.subscribeToPublishing(plan, @checkPublishingStatus)

    @setState(publishing: publishState.isPublishing)

  saved: ->

React = require 'react'
BS = require 'react-bootstrap'

{TaskPlanStore, TaskPlanActions} = require '../../../flux/task-plan'
{PlanPublishStore} = require '../../../flux/plan-publish'
PlanHelper = require '../../../helpers/plan'

HelpTooltip  = require './help-tooltip'
SaveButton   = require './save-button'
