<commit_before><div>
  <%= form_tag course_lesson_plan_bulk_update_path(@course), :method => 'POST' do %>
  <div class="page-header">
    <div class="row">
      <div class="span5">
        <h1>Lesson Plan: Overview</h1>
      </div>
      <div class="pull-right">
        <input type="submit" class="btn btn-primary" value="Done" />
      </div>
    </div>
  </div>

  <%= render :partial => 'lesson_plan/navigation' %>

  <div>
  <% grouped_milestones = @milestones.group_by { |milestone| milestone.is_virtual? } %>
  <% grouped_milestones[false] = [] unless grouped_milestones[false] %>
  <% grouped_milestones[true] = [] unless grouped_milestones[true] %>
  <% sorted_milestones = grouped_milestones[false].sort_by { |milestone| milestone.start_at } + grouped_milestones[true] %>
  <% sorted_milestones.each { |milestone| %>
    <% if !milestone.is_virtual? || milestone.entries.length  > 0 %>
      <%= render :partial => 'lesson_plan/overview_milestone', locals: { :milestone => milestone } %>
    <% end %>
  <% } %>
  </div>
  <% end %>
</div><commit_msg>Only show virtual milestones with >0 editable entries.<commit_after><div>
  <%= form_tag course_lesson_plan_bulk_update_path(@course), :method => 'POST' do %>
  <div class="page-header">
    <div class="row">
      <div class="span5">
        <h1>Lesson Plan: Overview</h1>
      </div>
      <div class="pull-right">
        <input type="submit" class="btn btn-primary" value="Done" />
      </div>
    </div>
  </div>

  <%= render :partial => 'lesson_plan/navigation' %>

  <div>
  <% grouped_milestones = @milestones.group_by { |milestone| milestone.is_virtual? } %>
  <% grouped_milestones[false] = [] unless grouped_milestones[false] %>
  <% grouped_milestones[true] = [] unless grouped_milestones[true] %>
  <% sorted_milestones = grouped_milestones[false].sort_by { |milestone| milestone.start_at } + grouped_milestones[true] %>
  <% sorted_milestones.each { |milestone| %>
    <% actual_entries = milestone.entries.select { |e| !e.is_virtual?  } %>
    <% if !milestone.is_virtual? || actual_entries.length  > 0 %>
      <%= render :partial => 'lesson_plan/overview_milestone', locals: { :milestone => milestone } %>
    <% end %>
  <% } %>
  </div>
  <% end %>
</div>
{'fraction_non_alphanumeric': 0.17901785714285715, 'fraction_numerical': 0.0040178571428571425, 'mean_word_length': 3.86117136659436, 'pattern_counts': {'":': 0, '<': 58, '<?xml version=': 0, '>': 69, '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': '7234867', 'n_tokens_mistral': 845, 'n_tokens_neox': 741, 'n_words': 132}