<commit_before>import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Popover } from 'react-bootstrap';
import { observer } from 'mobx-react';
import { observable, action } from 'mobx';
import TH from '../../helpers/task';
import TutorLink from '../../components/link';
import { LateWork } from './late-work';
import PieProgress from './pie-progress';
import Correctness from './correctness-value';
import TaskResult from '../../models/course/scores/task-result';
import UX from './ux';

const HomeworkScore = ({ task, displayAs, ux }) => {

  const scorePercent = TH.getHumanScorePercent(task);
  const scoreNumber = TH.getHumanScoreNumber(task);
  const completed = task.completed_exercise_count === task.exercise_count;
  const scoreText = completed || TH.isDue(task) ? displayAs === 'number' ? scoreNumber : scorePercent : '---';

  if (TH.isHomeworkTaskStarted(task)) {
    return (
      <div className="score">
        <TutorLink
          to="viewTaskStep"
          data-assignment-type={`${task.type}`}
          params={{ courseId: ux.course.id, id: task.id, stepIndex: 1 }}>
          {scoreText}
        </TutorLink>
      </div>
    );
  }

  return (
    <div className="score not-started">
      ---
    </div>
  );

};


@observer
export default class HomeworkCell extends React.PureComponent {

  static propTypes = {
    ux: React.PropTypes.instanceOf(UX).isRequired,
    className: React.PropTypes.string,
    isConceptCoach: React.PropTypes.bool,
    columnIndex: React.PropTypes.number.isRequired,
    task: React.PropTypes.instanceOf(TaskResult).isRequired,
  }<commit_msg>remove unused HomeworkScore<commit_after>import React from 'react';
import ReactDOM from 'react-dom';
import { Overlay, Popover } from 'react-bootstrap';
import { observer } from 'mobx-react';
import { observable, action } from 'mobx';
import TH from '../../helpers/task';
import TutorLink from '../../components/link';
import { LateWork } from './late-work';
import PieProgress from './pie-progress';
import Correctness from './correctness-value';
import TaskResult from '../../models/course/scores/task-result';
import UX from './ux';

@observer
export default class HomeworkCell extends React.PureComponent {

  static propTypes = {
    ux: React.PropTypes.instanceOf(UX).isRequired,
    className: React.PropTypes.string,
    isConceptCoach: React.PropTypes.bool,
    columnIndex: React.PropTypes.number.isRequired,
    task: React.PropTypes.instanceOf(TaskResult).isRequired,
  }
{'fraction_non_alphanumeric': 0.14257188498402557, 'fraction_numerical': 0.00039936102236421724, 'mean_word_length': 3.7714285714285714, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, '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': '2645237', 'n_tokens_mistral': 757, 'n_tokens_neox': 737, 'n_words': 186}