```coffeescript
React = require 'react'
BS = require 'react-bootstrap'
Router = require 'react-router'
_ = require 'underscore'

LearningGuide  = require '../../flux/learning-guide'
PracticeButton = require './practice-button'
WeakerSections = require './weaker-sections'

WeakerPanel = React.createClass
  propTypes:
    courseId:            React.PropTypes.string.isRequired
    sections:            React.PropTypes.array.isRequired
    weakerTitle:         React.PropTypes.string.isRequired
    weakerExplanation:   React.PropTypes.element.isRequired
    weakerEmptyMessage:  React.PropTypes.string.isRequired
    onPractice:          React.PropTypes.func
    sectionCount:        React.PropTypes.number
    sampleSizeThreshold: React.PropTypes.number.isRequired

  render: ->
    # Do not render if we have no sections
    return null if @props.sections.length is 0

    <div className="chapter-panel weaker">
      <div className='chapter metric'>
        <span className='title'>{@props.weakerTitle}</span>
        {@props.weakerExplanation}
        {if LearningGuide.Helpers.canDisplayWeakest(@props) # hide practice button when the panel is empty
          <PracticeButton title='Practice All'
            sections=LearningGuide.Helpers.weakestSections(@props.sections)
            courseId={@props.courseId} /> }
      </div>
      <WeakerSections {...@props} />

    </div>


module.exports = WeakerPanel
```

Hide practice button if practice handler isn't provided
user
```coffeescript
React = require 'react'
BS = require 'react-bootstrap'
Router = require 'react-router'
_ = require 'underscore'

LearningGuide  = require '../../flux/learning-guide'
PracticeButton = require './practice-button'
WeakerSections = require './weaker-sections'

WeakerPanel = React.createClass
  propTypes:
    courseId:            React.PropTypes.string.isRequired
    sections:            React.PropTypes.array.isRequired
    weakerTitle:         React.PropTypes.string.isRequired
    weakerExplanation:   React.PropTypes.element.isRequired
    weakerEmptyMessage:  React.PropTypes.string.isRequired
    onPractice:          React.PropTypes.func
    sectionCount:        React.PropTypes.number
    sampleSizeThreshold: React.PropTypes.number.isRequired

  render: ->
    # Do not render if we have no sections
    return null if @props.sections.length is 0

    <div className="chapter-panel weaker">
      <div className='chapter metric'>
        <span className='title'>{@props.weakerTitle}</span>
        {@props.weakerExplanation}
        {if @props.onPractice and LearningGuide.Helpers.canDisplayWeakest(@props)
          <PracticeButton title='Practice All'
            sections=LearningGuide.Helpers.weakestSections(@props.sections)
            courseId={@props.courseId} /> }
      </div>
      <WeakerSections {...@props} />

    </div>


module.exports = WeakerPanel
```
assistant