       homework: React.PropTypes.object
       reading: React.PropTypes.object
     ).isRequired
+    courseId: React.PropTypes.string.isRequired
     selectedExercises: React.PropTypes.array
     filter: React.PropTypes.string
     onFilterChange: React.PropTypes.func.isRequired

cn = require 'classnames'

{ExerciseStore, ExerciseActions} = require '../../flux/exercise'
{PinnedHeader} = require 'openstax-react-components'
Icon = require '../icon'
ScrollSpy = require '../scroll-spy'
Sectionizer = require './sectionizer'

    if filter is @props.filter then filter = ''
    @props.onFilterChange( filter )

  saveExclusions: ->
    ExerciseActions.saveExclusions(@props.courseId)

  resetExclusions: ->
    ExerciseActions.resetUnsavedExclusions()

  renderSaveCancelButtons: ->
    [
        <AsyncButton key='save' bsStyle='primary' className="save"
          onClick={@saveExclusions}
          waitingText='Saving...'
          isWaiting={ExerciseStore.isSavingExclusions()}
        >Save</AsyncButton>
        <BS.Button key='cancel' className="cancel" onClick={@resetExclusions}>Cancel</BS.Button>
    ]

