<commit_before>React             = require 'react'
EnrollButton      = require '../students/enroll_button'

InlineUsers = React.createClass(
  displayName: 'InlineUsers'
  render: ->
    key = @props.title + '_' + @props.role
    last_user_index = @props.users.length - 1
    user_list = @props.users.map (user, index) ->
      link = "https://en.wikipedia.org/wiki/User:#{user.wiki_id}"
      if user.real_name?
        extra_info = " (#{user.wiki_id}#{if user.email? then " / " + user.email else ""})"
      else
        extra_info = ''
      extra_info = extra_info + ', ' unless index == last_user_index

      <span key={user.wiki_id}><a href={link}>{user.wiki_id}</a>{extra_info}</span>

    user_list = if user_list.length > 0 then user_list else 'None'
    if @props.users.length > 0 || @props.editable
      inline_list = <span>{@props.title}: {user_list}</span>
    allowed = @props.role != 4 || (@props.current_user.role == 4 || @props.current_user.admin)
    button = <EnrollButton {...@props} users={@props.users} role={@props.role} key={key} inline=true allowed={allowed} show={@props.editable && allowed} />

    <p key={key}>{inline_list}{button}</p>
)
<commit_msg>Use real name instead of username in parens<commit_after>React             = require 'react'
EnrollButton      = require '../students/enroll_button'

InlineUsers = React.createClass(
  displayName: 'InlineUsers'
  render: ->
    key = @props.title + '_' + @props.role
    last_user_index = @props.users.length - 1
    user_list = @props.users.map (user, index) ->
      link = "https://en.wikipedia.org/wiki/User:#{user.wiki_id}"
      if user.real_name?
        extra_info = " (#{user.real_name}#{if user.email? then " / " + user.email else ""})"
      else
        extra_info = ''
      extra_info = extra_info + ', ' unless index == last_user_index

      <span key={user.wiki_id}><a href={link}>{user.wiki_id}</a>{extra_info}</span>

    user_list = if user_list.length > 0 then user_list else 'None'
    if @props.users.length > 0 || @props.editable
      inline_list = <span>{@props.title}: {user_list}</span>
    allowed = @props.role != 4 || (@props.current_user.role == 4 || @props.current_user.admin)
    button = <EnrollButton {...@props} users={@props.users} role={@props.role} key={key} inline=true allowed={allowed} show={@props.editable && allowed} />

    <p key={key}>{inline_list}{button}</p>
)

{'fraction_non_alphanumeric': 0.17293233082706766, 'fraction_numerical': 0.004177109440267335, 'mean_word_length': 3.3231046931407944, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 29, 'https://': 2, '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': '2012554', 'n_tokens_mistral': 811, 'n_tokens_neox': 804, 'n_words': 155}