<commit_before>const { Input } = ReactBootstrap;
const { Row } = ReactBootstrap;
const { Col } = ReactBootstrap;
const { Button } = ReactBootstrap;
const { ButtonGroup } = ReactBootstrap;
const { Panel } = ReactBootstrap;
const { ListGroup } = ReactBootstrap;
const { ListGroupItem } = ReactBootstrap;
const { Glyphicon } = ReactBootstrap;
const { Tabs } = ReactBootstrap;
const { Tab } = ReactBootstrap;

const { update } = React.addons;

const MemberManagementItem = React.createClass({
  removeTeam() {
    const data = {
      team_id: this.props.tid
    };
    apiCall("POST", `/api/v1/groups/${this.props.gid}/remove_team`, data,
      "Group", "RemoveMember")
      .done(data => {
        apiNotify({
          status: 1,
          message: "Team has successfully left the classroom."
        });
        this.props.refresh();
      })
      .fail(jqXHR => {
        apiNotify({ status: 0, message: jqXHR.responseJSON.message });
      });
  },

  elevateTeam() {
    const data = {
      team_id: this.props.tid
    };
    apiCall("POST", `/api/v1/groups/${this.props.gid}/elevate_team`, data,
      "Group", "ElevateTeacher")
      .done(data => {
        apiNotify({
          status: 1,
          message: "Team has been elevated to teacher role."
        });
        this.props.refresh();
      })
      .fail(jqXHR => {
        apiNotify({ status: 0, message: jqXHR.responseJSON.message });
      });
  },

  render() {
    return (
      <ListGroupItem>
        <Row className="row">
          <Col xs={2}>
            <Button bsStyle={this.props.isTeacher ? 'success' : 'primary'} className="btn-sq">
              <Glyphicon glyph="user" bsSize="large" />
            </Button>
          </Col>
          <Col xs={6}>
            <h4>{this.props.team_name}</h4>
            <p>
              <strong>Affiliation:</strong> {this.props.affiliation}
            </p>
          </Col>
          <Col xs={4}>
            <ButtonGroup vertical={true}>
              {this.props.tid !== this.props.owner &&
                <Button onClick={this.removeTeam}>Remove {this.props.isTeacher ? 'Teacher' : 'Team'}</Button>
              }
              {this.props.isTeacher === false && this.props.members[0].usertype === 'teacher' &&
                <Button onClick={this.elevateTeam}>Promote to Teacher</Button>
              }
            </ButtonGroup>
          </Col>
        </Row>
      </ListGroupItem>
    );
  }<commit_msg>Fix button text for clarity of users/teams<commit_after>const { Input } = ReactBootstrap;
const { Row } = ReactBootstrap;
const { Col } = ReactBootstrap;
const { Button } = ReactBootstrap;
const { ButtonGroup } = ReactBootstrap;
const { Panel } = ReactBootstrap;
const { ListGroup } = ReactBootstrap;
const { ListGroupItem } = ReactBootstrap;
const { Glyphicon } = ReactBootstrap;
const { Tabs } = ReactBootstrap;
const { Tab } = ReactBootstrap;

const { update } = React.addons;

const MemberManagementItem = React.createClass({
  removeTeam() {
    const data = {
      team_id: this.props.tid
    };
    apiCall("POST", `/api/v1/groups/${this.props.gid}/remove_team`, data,
      "Group", "RemoveMember")
      .done(data => {
        apiNotify({
          status: 1,
          message: "Team has successfully left the classroom."
        });
        this.props.refresh();
      })
      .fail(jqXHR => {
        apiNotify({ status: 0, message: jqXHR.responseJSON.message });
      });
  },

  elevateTeam() {
    const data = {
      team_id: this.props.tid
    };
    apiCall("POST", `/api/v1/groups/${this.props.gid}/elevate_team`, data,
      "Group", "ElevateTeacher")
      .done(data => {
        apiNotify({
          status: 1,
          message: "Team has been elevated to teacher role."
        });
        this.props.refresh();
      })
      .fail(jqXHR => {
        apiNotify({ status: 0, message: jqXHR.responseJSON.message });
      });
  },

  render() {
    return (
      <ListGroupItem>
        <Row className="row">
          <Col xs={2}>
            <Button bsStyle={this.props.isTeacher ? 'success' : 'primary'} className="btn-sq">
              <Glyphicon glyph="user" bsSize="large" />
            </Button>
          </Col>
          <Col xs={6}>
            <h4>{this.props.team_name}</h4>
            <p>
              <strong>Affiliation:</strong> {this.props.affiliation}
            </p>
          </Col>
          <Col xs={4}>
            <ButtonGroup vertical={true}>
              {this.props.tid !== this.props.owner &&
                <Button onClick={this.removeTeam}>Remove {this.props.isTeacher ? 'Teacher' : 'User/Team'}</Button>
              }
              {this.props.isTeacher === false && this.props.members[0].usertype === 'teacher' &&
                <Button onClick={this.elevateTeam}>Promote to Teacher</Button>
              }
            </ButtonGroup>
          </Col>
        </Row>
      </ListGroupItem>
    );
  }
{'fraction_non_alphanumeric': 0.15309446254071662, 'fraction_numerical': 0.004885993485342019, 'mean_word_length': 2.045877247365158, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 61, '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': '2548801', 'n_tokens_mistral': 1538, 'n_tokens_neox': 1484, 'n_words': 294}