<commit_before><%= link_to 'Synchroniser avec Google', promotion_events_sync_path(promotion_id: @promotion.id), method: :post, class: 'btn btn-default btn-lg' %>

<h2>Evénements Google Calendar bruts</h2>
<p><%= @promotion.calendar_events.count %> événements importés de Google</p>
<table class="table">
  <thead>
    <tr>
      <th>Cours</th>
      <th>Description</th>
      <th>Personnes</th>
      <th>Date</th>
      <th>Heures</th>
    </tr>
  </thead>
  <tbody>
    <% @promotion.calendar_events.each do |event| %>
      <tr>
        <td><%= event.summary %></td>
        <td><%= event.description %></td>
        <td><%= raw event.attendee.map { |attendee| attendee.to_s.remove('mailto:') }.join '<br>' %></td>
        <td><%= event.dtstart.strftime "%d/%m/%Y" %></td>
        <td><%= (event.dtend - event.dtstart) / 60 / 60 %></td>
      </tr>
    <% end unless @promotion.calendar_events.nil? %>
  </tbody>
</table>

<h2>Evénements Google Calendar importés</h2>
<p><%= @promotion.events.count %> événements traités</p>
<table class="table">
  <thead>
    <tr>
      <th>Module</th>
      <th>Date</th>
      <th>Type</th>
      <th>Heures</th>
      <th>Heures étudiants</th>
      <th>Heures enseignant</th>
      <th>Personnes</th>
    </tr>
  </thead>
  <tbody>
    <% @promotion.events.each do |event| %>
      <tr>
        <td><%= event.teaching_module %></td>
        <td><%= event.date.strftime "%d/%m/%Y" %></td>
        <td><%= event.kind.to_s.upcase %></td>
        <td><%= number_to_human event.duration %></td>
        <td><%= number_to_human event.student_hours %></td>
        <td><%= number_to_human event.teacher_hours %></td>
        <td>
          <% event.users.each do |user| %>
            <%= link_to user, user %><br>
          <% end %><commit_msg>events<commit_after><%= link_to 'Synchroniser avec Google', promotion_events_sync_path(promotion_id: @promotion.id), method: :post, class: 'btn btn-default btn-lg' %>

<ul>
  <li><a href="#raw"><%= @promotion.calendar_events.count %> événements Google Calendar bruts</a></li>
  <li><a href="#imported"><%= @promotion.calendar_events.count %> événements Google Calendar bruts</a></li>
</ul>

<h2 id="raw"><%= @promotion.calendar_events.count %> événements Google Calendar bruts</h2>
<table class="table">
  <thead>
    <tr>
      <th>Cours</th>
      <th>Description</th>
      <th>Personnes</th>
      <th>Date</th>
      <th>Heures</th>
    </tr>
  </thead>
  <tbody>
    <% @promotion.calendar_events.each do |event| %>
      <tr>
        <td><%= event.summary %></td>
        <td><%= event.description %></td>
        <td><%= raw event.attendee.map { |attendee| attendee.to_s.remove('mailto:') }.join '<br>' %></td>
        <td><%= event.dtstart.strftime "%d/%m/%Y" %></td>
        <td><%= (event.dtend - event.dtstart) / 60 / 60 %></td>
      </tr>
    <% end unless @promotion.calendar_events.nil? %>
  </tbody>
</table>

<h2 id="imported"><%= @promotion.events.count %> événements Google Calendar importés</h2>
<table class="table">
  <thead>
    <tr>
      <th>Module</th>
      <th>Date</th>
      <th>Type</th>
      <th>Heures</th>
      <th>Heures étudiants</th>
      <th>Heures enseignant</th>
      <th>Personnes</th>
    </tr>
  </thead>
  <tbody>
    <% @promotion.events.each do |event| %>
      <tr>
        <td><%= event.teaching_module %></td>
        <td><%= event.date.strftime "%d/%m/%Y" %></td>
        <td><%= event.kind.to_s.upcase %></td>
        <td><%= number_to_human event.duration %></td>
        <td><%= number_to_human event.student_hours %></td>
        <td><%= number_to_human event.teacher_hours %></td>
        <td>
          <% event.users.each do |user| %>
            <%= link_to user, user %><br>
          <% end %>
{'fraction_non_alphanumeric': 0.2141711229946524, 'fraction_numerical': 0.0042780748663101605, 'mean_word_length': 2.7673716012084593, 'pattern_counts': {'":': 0, '<': 199, '<?xml version=': 0, '>': 199, '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': '4023818', 'n_tokens_mistral': 1479, 'n_tokens_neox': 1387, 'n_words': 268}