<commit_before><% provide(:title, "Frage #{@question.ident}") %>

<div>
  <%= render "admin/action_menu" %>
  <%= render "action_menu" %>
  <h2>Frage <%=@question.ident%></h2>
  <%=trace_to_root_formatter @question.trace_to_root(true)%>

  <table>
    <tr>
      <th>Elter</th>
      <td><%= link_to_parent(@question) %></td>

      <th>Gültig?</th>
      <td>
        <% if @question.complete? %>
          ja
        <% else %>
          <span class="wrong">nein: <%= @question.incomplete_reason %></span>
        <% end %>
      </td>

      <th>richtig?</th>
      <td><%= number_to_percentage(@question.correct_ratio*100, :precision => 2) %> (<%=@question.correct_count%>)</td>
    </tr>
    <tr>
      <th>Typ</th>
      <td><%= @question.difficulty(:name) %></td>

      <th>Reviews</th>
      <td>
        <% cnt = @question.reviews.group(:okay).count %>
        <span class="correct">✓ <%=cnt[true] || 0%></span>&nbsp;&nbsp;
        <span class="wrong">✗ <%=cnt[false] || 0%></span>&nbsp;&nbsp;
        <%=link_to "Reviews anzeigen", question_review_path(@question) %>
      </td>

      <th>übersprungen?</th>
      <td><%= number_to_percentage(@question.skip_ratio*100, :precision => 2) %> (<%=@question.skip_count%>)</td>
    </tr>

    <tr>
      <th>Studiengang</th>
      <td><%= @question.study_path(:name) %></td>

      <th>Matrix-Mode?</th>
      <td><%= @question.matrix_validate? %></td>
    </tr>

    <tr><th>Text</th><td colspan="5"><%=@question.text%></td></tr>
    <% if @question.text.include?("§") or @questions.answers.any? { |a| a.text.include?("§") } %>
      <tr><th>Hinweis</th><td colspan="5">Diese Frage (oder eine der Antworten) verwendet die alte §-Notation. Bitte bei Gelegenheit auf die $-Notation umstellen, da die §-Unterstützung verschwinden wird.</td></tr>
    <% end %>
  </table>

  <h3>Antworten</h3>
  <% counts = get_answer_stat_counts(@question) %>
  <table id="answertable" class="tablesorter">
    <thead><tr><th>Ident</th><th>Text</th><th>Korrekt?</th><th title="wie häufig wird diese Antwort angekreuzt" style="cursor: help">✓-%</th><th>Subfragen</th><th>Subkategorie</th><th>Aktionen</th></tr></thead>
    <tbody>
    <% @question.answers.each do |a| %>
      <tr>
        <%= content_tag :td, a.ident %><commit_msg>typo in deprecation warning<commit_after><% provide(:title, "Frage #{@question.ident}") %>

<div>
  <%= render "admin/action_menu" %>
  <%= render "action_menu" %>
  <h2>Frage <%=@question.ident%></h2>
  <%=trace_to_root_formatter @question.trace_to_root(true)%>

  <table>
    <tr>
      <th>Elter</th>
      <td><%= link_to_parent(@question) %></td>

      <th>Gültig?</th>
      <td>
        <% if @question.complete? %>
          ja
        <% else %>
          <span class="wrong">nein: <%= @question.incomplete_reason %></span>
        <% end %>
      </td>

      <th>richtig?</th>
      <td><%= number_to_percentage(@question.correct_ratio*100, :precision => 2) %> (<%=@question.correct_count%>)</td>
    </tr>
    <tr>
      <th>Typ</th>
      <td><%= @question.difficulty(:name) %></td>

      <th>Reviews</th>
      <td>
        <% cnt = @question.reviews.group(:okay).count %>
        <span class="correct">✓ <%=cnt[true] || 0%></span>&nbsp;&nbsp;
        <span class="wrong">✗ <%=cnt[false] || 0%></span>&nbsp;&nbsp;
        <%=link_to "Reviews anzeigen", question_review_path(@question) %>
      </td>

      <th>übersprungen?</th>
      <td><%= number_to_percentage(@question.skip_ratio*100, :precision => 2) %> (<%=@question.skip_count%>)</td>
    </tr>

    <tr>
      <th>Studiengang</th>
      <td><%= @question.study_path(:name) %></td>

      <th>Matrix-Mode?</th>
      <td><%= @question.matrix_validate? %></td>
    </tr>

    <tr><th>Text</th><td colspan="5"><%=@question.text%></td></tr>
    <% if @question.text.include?("§") or @question.answers.any? { |a| a.text.include?("§") } %>
      <tr><th>Hinweis</th><td colspan="5">Diese Frage (oder eine der Antworten) verwendet die alte §-Notation. Bitte bei Gelegenheit auf die $-Notation umstellen, da die §-Unterstützung verschwinden wird.</td></tr>
    <% end %>
  </table>

  <h3>Antworten</h3>
  <% counts = get_answer_stat_counts(@question) %>
  <table id="answertable" class="tablesorter">
    <thead><tr><th>Ident</th><th>Text</th><th>Korrekt?</th><th title="wie häufig wird diese Antwort angekreuzt" style="cursor: help">✓-%</th><th>Subfragen</th><th>Subkategorie</th><th>Aktionen</th></tr></thead>
    <tbody>
    <% @question.answers.each do |a| %>
      <tr>
        <%= content_tag :td, a.ident %>
{'fraction_non_alphanumeric': 0.23105644629914343, 'fraction_numerical': 0.007028332967274325, 'mean_word_length': 3.3620689655172415, 'pattern_counts': {'":': 0, '<': 225, '<?xml version=': 0, '>': 229, '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': '6064418', 'n_tokens_mistral': 1857, 'n_tokens_neox': 1727, 'n_words': 269}