<commit_before>'use strict'
EC.ActivityDetails = React.createClass({
  propTypes: {
    data: React.PropTypes.object.isRequired
  },

  objectiveTitle: function () {
    return [this.props.data.activity.classification.alias, "Objective"].join(' ');
  },

  getClassName: function () {
    return (this.props.data.concept_results.length ? 'activity-details' : 'activity-details no-concept-results')
  },

  render: function () {
    var dateTitle, dateBody;
    if (this.props.data.state == 'finished') {
      dateTitle = 'Completed:';
      dateBody = this.props.data.completed_at;
    } else {
      dateTitle = 'Due:';
      dateBody = this.props.data.due_date;
    }

    return (
      <div className={this.getClassName()}>
        <div className='activity-detail'>
          <div className='activity-detail-title objective-title'>
            <div className='grammar-icon-tooltip' />
            {this.objectiveTitle()}
          </div>
          <div className='activity-detail-body'>
            {this.props.data.activity.description}
          </div>
        </div>
        <div className='activity-detail'>
          <span className='activity-detail-title'>
            Activity:
          </span>
          <span className='activity-detail-body'>
            {this.props.data.activity.name}
          </span>
        </div>
        <div className='activity-detail'>
          <span className='activity-detail-title'>
            {dateTitle}
          </span>
          <span className='activity-detail-body'>
            {dateBody}
          </span>
        </div>
      </div>
    );
  }
});<commit_msg>show no due-date in scorebook tooltip when classroom-activity has no due_date<commit_after>'use strict'
EC.ActivityDetails = React.createClass({
  propTypes: {
    data: React.PropTypes.object.isRequired
  },

  objectiveTitle: function () {
    return [this.props.data.activity.classification.alias, "Objective"].join(' ');
  },

  getClassName: function () {
    return (this.props.data.concept_results.length ? 'activity-details' : 'activity-details no-concept-results')
  },

  dateOrNot: function () {
    if ((this.props.data.state != 'finished') && (!this.props.data.due_date)) {
      return null
    } else {
      var dateTitle, dateBody;
      if (this.props.data.state == 'finished') {
        dateTitle = 'Completed:';
        dateBody = this.props.data.completed_at;
      } else {
        dateTitle = 'Due:';
        dateBody = this.props.data.due_date;
      }
      return (
        <div className='activity-detail'>
          <span className='activity-detail-title'>
            {dateTitle}
          </span>
          <span className='activity-detail-body'>
            {dateBody}
          </span>
        </div>
      )
    }
  },

  render: function () {
    return (
      <div className={this.getClassName()}>
        <div className='activity-detail'>
          <div className='activity-detail-title objective-title'>
            <div className='grammar-icon-tooltip' />
            {this.objectiveTitle()}
          </div>
          <div className='activity-detail-body'>
            {this.props.data.activity.description}
          </div>
        </div>
        <div className='activity-detail'>
          <span className='activity-detail-title'>
            Activity:
          </span>
          <span className='activity-detail-body'>
            {this.props.data.activity.name}
          </span>
        </div>
        {this.dateOrNot()}
      </div>
    );
  }
});
{'fraction_non_alphanumeric': 0.14591051581647194, 'fraction_numerical': 0.0, 'mean_word_length': 2.1117021276595747, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, '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': '2767361', 'n_tokens_mistral': 1013, 'n_tokens_neox': 999, 'n_words': 173}