<commit_before>import React from 'react';
import { Popover, OverlayTrigger } from 'react-bootstrap';
import Icon from '../icon';

const TUTOR_AVERAGE_INFO = `\
Class averages are not displayed or included in the overall average until
 after the assignment due date.
 At that time, scores from all assignments, both complete and incomplete, are included.\
`;

const CC_AVERAGE_INFO = `\
Scores from completed assignments
 (in which all questions have been answered)
 are included in class and overall averages.\
`;


export default class AverageInfo extends React.PureComponent {

  static propTypes = {
    isConceptCoach: React.PropTypes.bool.isRequired,
  }

  render() {
    const title = 'Class and Overall Averages';

    const body =
      this.props.isConceptCoach ?
        CC_AVERAGE_INFO
        :
        TUTOR_AVERAGE_INFO;

    const popover =
      <Popover
        title={title}
        id="scores-average-info-popover"
        className="scores-average-info-popover">
        {body}
      </Popover>;


    return (
      <OverlayTrigger
        ref="overlay"
        placement="right"
        trigger="click"
        rootClose={true}
        overlay={popover}><commit_msg>Update Class Performance (i) copy<commit_after>import React from 'react';
import { Popover, OverlayTrigger } from 'react-bootstrap';
import Icon from '../icon';

const TUTOR_AVERAGE_INFO = `\
Class performance reflects class-wide averages of assignment scores and assignment progress. This metric includes scores and work 
completed by the due date.\
`;

const CC_AVERAGE_INFO = `\
Scores from completed assignments
 (in which all questions have been answered)
 are included in class and overall averages.\
`;


export default class AverageInfo extends React.PureComponent {

  static propTypes = {
    isConceptCoach: React.PropTypes.bool.isRequired,
  }

  render() {
    const title = 'Class performance';

    const body =
      this.props.isConceptCoach ?
        CC_AVERAGE_INFO
        :
        TUTOR_AVERAGE_INFO;

    const popover =
      <Popover
        title={title}
        id="scores-average-info-popover"
        className="scores-average-info-popover">
        {body}
      </Popover>;


    return (
      <OverlayTrigger
        ref="overlay"
        placement="right"
        trigger="click"
        rootClose={true}
        overlay={popover}>
{'fraction_non_alphanumeric': 0.08839779005524862, 'fraction_numerical': 0.0, 'mean_word_length': 2.9038142620232175, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3216266', 'n_tokens_mistral': 686, 'n_tokens_neox': 654, 'n_words': 197}