<commit_before>React           = require 'react'
RDnD            = require 'react-dnd'
HTML5Backend    = require 'react-dnd-html5-backend'
DDContext       = RDnD.DragDropContext

Week            = require '../timeline/week'

CourseStore     = require '../../stores/course_store'
WeekStore       = require '../../stores/week_store'
BlockStore      = require '../../stores/block_store'

getState = ->
  weeks: WeekStore.getWeeks()
  current: CourseStore.getCurrentWeek()

ThisWeek = React.createClass(
  displayName: 'ThisWeek'
  mixins: [CourseStore.mixin, WeekStore.mixin, BlockStore.mixin]
  getInitialState: ->
    getState()
  storeDidChange: ->
    @setState getState()
  render: ->
    week = @state.weeks[@state.current]
    if week?
      week_component = (
        <Week
          week={week}
          index={@state.current + 1}
          key={week.id}
          editable=false
          blocks={BlockStore.getBlocksInWeek(week.id)}
          moveBlock={null}
          deleteWeek={null}
          showTitle=false
        />
      )
      if moment().diff(@props.timeline_start, 'days') < 0
        week_end = moment(@props.timeline_start).add(7, 'days')
        title = "First Week (#{moment(@props.timeline_start).format('MM/DD')} - #{week_end.format('MM/DD')})"
      else
        title = "Week #{@state.current + 1}#{if week.title? && week.title.length > 0 then ': ' + week.title else ''}"
    else
      no_weeks = (
        <li className="row view-all">
          <div><p>There is nothing on the schedule for this week</p></div>
        </li>
      )

    <div className="module">
      <div className="section-header">
        <h3>{title || 'This Week'}</h3>
      </div>
      <ul className="list-unstyled"><commit_msg>on course overview, just show 'this week' and remove logic<commit_after>React           = require 'react'
RDnD            = require 'react-dnd'
HTML5Backend    = require 'react-dnd-html5-backend'
DDContext       = RDnD.DragDropContext

Week            = require '../timeline/week'

CourseStore     = require '../../stores/course_store'
WeekStore       = require '../../stores/week_store'
BlockStore      = require '../../stores/block_store'

getState = ->
  weeks: WeekStore.getWeeks()
  current: CourseStore.getCurrentWeek()

ThisWeek = React.createClass(
  displayName: 'ThisWeek'
  mixins: [CourseStore.mixin, WeekStore.mixin, BlockStore.mixin]
  getInitialState: ->
    getState()
  storeDidChange: ->
    @setState getState()
  render: ->
    week = @state.weeks[@state.current]
    if week?
      week_component = (
        <Week
          week={week}
          index={@state.current + 1}
          key={week.id}
          editable=false
          blocks={BlockStore.getBlocksInWeek(week.id)}
          moveBlock={null}
          deleteWeek={null}
          showTitle=false
        />
      )
    else
      no_weeks = (
        <li className="row view-all">
          <div><p>There is nothing on the schedule for this week</p></div>
        </li>
      )

    <div className="module">
      <div className="section-header">
        <h3>This Week</h3>
      </div>
      <ul className="list-unstyled">
{'fraction_non_alphanumeric': 0.1434934775692014, 'fraction_numerical': 0.004454342984409799, 'mean_word_length': 2.288702928870293, 'pattern_counts': {'":': 0, '<': 30, '<?xml version=': 0, '>': 38, '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': '3519111', 'n_tokens_mistral': 981, 'n_tokens_neox': 977, 'n_words': 194}