<commit_before>React             = require 'react'
Gradeable         = require './gradeable'
GradeableActions  = require '../../actions/gradeable_actions'
BlockStore        = require '../../stores/block_store'

Grading = React.createClass(
  displayName: 'Grading'
  addGradeable: ->
    GradeableActions.addGradeableToCourse()
  deleteGradeable: (gradeable_id) ->
    GradeableActions.deleteGradeable gradeable_id
  render: ->
    total = _.sum(@props.gradeables, 'points')
    gradeables = @props.gradeables.map (gradeable, i) =>
      unless gradeable.deleted
        block = BlockStore.getBlock(gradeable.gradeable_item_id)
        <Gradeable
          gradeable={gradeable}
          block={block}
          key={gradeable.id}
          editable={@props.editable}
          total={total}
          deleteGradeable={@deleteGradeable.bind(this, gradeable.id)}
        />
    gradeables.sort (a, b) ->
      return 1 unless a.props.gradeable? && b.props.gradeable?
      a.props.gradeable.order - b.props.gradeable.order
    if @props.editable && false
      addGradeable = (
        <li className="row view-all">
          <div>
            <button className='button dark' onClick={@addGradeable}>Add New Grading Item</button>
          </div>
        </li>
      )
    unless gradeables.length
      no_gradeables = (
        <li className="row view-all">
          <div><p>This course has no gradeable assignments</p></div>
        </li>
      )

    <div>
      <div className="section-header">
        <h3>Grading <span>(Total: {total}%)</span></h3>
        {@props.controls(null, @props.gradeables.length < 1)}
      </div>
      <ul className="list-unstyled">
        {gradeables}
        {no_gradeables}
        {addGradeable}
      </ul>
    </div>
)

module.exports = Grading<commit_msg>Remove dead code from Grading component of timeline<commit_after>React             = require 'react'
Gradeable         = require './gradeable'
GradeableActions  = require '../../actions/gradeable_actions'
BlockStore        = require '../../stores/block_store'

Grading = React.createClass(
  displayName: 'Grading'
  render: ->
    total = _.sum(@props.gradeables, 'points')
    gradeables = @props.gradeables.map (gradeable, i) =>
      block = BlockStore.getBlock(gradeable.gradeable_item_id)
      <Gradeable
        gradeable={gradeable}
        block={block}
        key={gradeable.id}
        editable={@props.editable}
        total={total}
      />
    gradeables.sort (a, b) ->
      return 1 unless a.props.gradeable? && b.props.gradeable?
      a.props.gradeable.order - b.props.gradeable.order
    unless gradeables.length
      no_gradeables = (
        <li className="row view-all">
          <div><p>This course has no gradeable assignments</p></div>
        </li>
      )

    <div>
      <div className="section-header">
        <h3>Grading <span>(Total: {total}%)</span></h3>
        {@props.controls(null, @props.gradeables.length < 1)}
      </div>
      <ul className="list-unstyled">
        {gradeables}
        {no_gradeables}
      </ul>
    </div>
)

module.exports = Grading
{'fraction_non_alphanumeric': 0.13774193548387098, 'fraction_numerical': 0.0025806451612903226, 'mean_word_length': 2.400219298245614, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5213351', 'n_tokens_mistral': 965, 'n_tokens_neox': 950, 'n_words': 180}