<commit_before>React = require 'react'

NewCourseRegistration = require './new-registration'
ModifyCourseRegistration = require './modify-registration'
EnrollOrLogin = require './enroll-or-login'

UserStatusMixin = require '../user/status-mixin'
Course = require './model'

CourseRegistration = React.createClass

  propTypes:
    collectionUUID: React.PropTypes.string.isRequired

  mixins: [UserStatusMixin]

  render: ->
    user = @getUser()

    body = if user.isLoggedIn()
      <NewCourseRegistration {...@props} />
    else
      <EnrollOrLogin {...@props} />

    <div className="row">
      {body}
    </div>

module.exports = CourseRegistration<commit_msg>Prep for second semester when given<commit_after>React = require 'react'

NewCourseRegistration = require './new-registration'
ModifyCourseRegistration = require './modify-registration'
EnrollOrLogin = require './enroll-or-login'

UserStatusMixin = require '../user/status-mixin'
Course = require './model'

CourseRegistration = React.createClass

  propTypes:
    collectionUUID: React.PropTypes.string.isRequired
    secondSemester: React.PropTypes.bool

  mixins: [UserStatusMixin]

  componentWillMount: ->
    @getCourse().prepForSecondSemesterEnrollment() if @props.secondSemester

  render: ->
    user = @getUser()

    body = if user.isLoggedIn()
      <NewCourseRegistration {...@props} />
    else
      <EnrollOrLogin {...@props} />

    <div className="row">
      {body}
    </div>

module.exports = CourseRegistration
{'fraction_non_alphanumeric': 0.12808539026017346, 'fraction_numerical': 0.0, 'mean_word_length': 3.7318611987381702, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 14, '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': '3203383', 'n_tokens_mistral': 464, 'n_tokens_neox': 440, 'n_words': 94}