<commit_before><% if @current_user.admin? %>
  <li class='section'><%= t('quick_links') %></li>
  <li>
    <%= link_to t(:create_new_assignment),
                controller: 'assignments',
                action: 'new' %>
  </li>
  <li>
    <%= link_to t(:create_new_grade_entry_form),
                controller: 'grade_entry_forms',
                action: 'new' %>
  </li>
<% end %>


<% @assignments = Assignment.order(short_identifier: :asc) %>

<% @assignments.each do |assignment| %>
  <% if assignment == @assignments.first %>
    <li class='section'><%= t('assignments') %></li>
  <% end %>

  <% if assignment.is_peer_review? %>

  <% elsif assignment != @assignment
    if (controller.controller_name == 'assignments' &&
        (controller.action_name == 'index' ||
         controller.action_name == 'new') ||
       controller.controller_name == 'results' ||
       controller.controller_name == 'grade_entry_forms' ||
       controller.controller_name == 'marks_graders' ||
       controller.controller_name == 'automated_tests' )
      if @current_user.student? %>
        <li>
          <% # Don't show hidden assignments to students
            if !assignment.is_hidden %>

            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'student_interface',
                          id: assignment.id },
                        title: assignment.description,
                        class: 'title' %>
          <% end %>
        </li>
      <% elsif @current_user.ta? %>
        <li>
          <%= render partial: 'shared/pr_dropdown_menu_li',
                     locals: { assignment: assignment,
                               current_user: @current_user} %>

          <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        browse_assignment_submissions_path(assignment),
                        title: assignment.description,
                        class: 'title' %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        browse_assignment_submissions_path(assignment),
                        title: assignment.description,
                        class: 'title' %>
          <% end %>
        </li>
      <% else %>
        <li>
          <%= render partial: 'shared/pr_dropdown_menu_li',
                     locals: { assignment: assignment,
                               current_user: @current_user} %>

          <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        { controller: 'assignments',
                          action: 'edit',
                          id: assignment.id },
                        title: assignment.description,
                        class: 'title' %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'edit',
                          id: assignment.id },
                        title: assignment.description,
                        class: 'title' %>
          <% end %>
        </li>
      <% end %>
    <% else %>
      <li>
        <% # If the current controller is criteria, we have to stay in the same
           # controller.
           if controller.controller_name == 'criteria'
          target_controller = 'criteria'
        else
          target_controller = controller.controller_name == 'assignments' ||
                  controller.controller_name == 'automated_tests' ? nil :
                  controller.controller_name
          target_action = controller.action_name == 'index' ||
                  controller.action_name == 'manage' ? nil :
                  controller.action_name
        end %>
        <% # If the current controller action is repo_browser, the drop down
           # menu for assignments should go to browse, and not repo_browser
           if target_action == 'repo_browser'
          target_action = 'browse'
           elsif target_action == 'update'
             target_action = 'edit'
           elsif target_action == 'create'
             target_action = 'new'
        end %>
        <% # Don't show hidden assignments in the dropdown menu for students
           # either. Append '(hidden)' for TAs and Admins.
           if !@current_user.student? %>

            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        polymorphic_url([assignment, target_controller],
                                        action: target_action),
                        title: assignment.description,
                        class: 'title' %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        polymorphic_url([assignment, target_controller],
                                        action: target_action),
                        title: assignment.description,
                        class: 'title' %>
          <% end %>
        <% # student user, so show only non-hidden assignments
           else %>
          <% if !assignment.is_hidden %>
            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'student_interface',
                          id: assignment.id },
                        title: assignment.description,
                        class: 'title' %><commit_msg>navigation-menu: Removed unused class<commit_after><% if @current_user.admin? %>
  <li class='section'><%= t('quick_links') %></li>
  <li>
    <%= link_to t(:create_new_assignment),
                controller: 'assignments',
                action: 'new' %>
  </li>
  <li>
    <%= link_to t(:create_new_grade_entry_form),
                controller: 'grade_entry_forms',
                action: 'new' %>
  </li>
<% end %>


<% @assignments = Assignment.order(short_identifier: :asc) %>

<% @assignments.each do |assignment| %>
  <% if assignment == @assignments.first %>
    <li class='section'><%= t('assignments') %></li>
  <% end %>

  <% if assignment.is_peer_review? %>

  <% elsif assignment != @assignment
    if (controller.controller_name == 'assignments' &&
        (controller.action_name == 'index' ||
         controller.action_name == 'new') ||
       controller.controller_name == 'results' ||
       controller.controller_name == 'grade_entry_forms' ||
       controller.controller_name == 'marks_graders' ||
       controller.controller_name == 'automated_tests' )
      if @current_user.student? %>
        <li>
          <% # Don't show hidden assignments to students
            if !assignment.is_hidden %>

            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'student_interface',
                          id: assignment.id },
                        title: assignment.description %>
          <% end %>
        </li>
      <% elsif @current_user.ta? %>
        <li>
          <%= render partial: 'shared/pr_dropdown_menu_li',
                     locals: { assignment: assignment,
                               current_user: @current_user} %>

          <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        browse_assignment_submissions_path(assignment),
                        title: assignment.description %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        browse_assignment_submissions_path(assignment),
                        title: assignment.description %>
          <% end %>
        </li>
      <% else %>
        <li>
          <%= render partial: 'shared/pr_dropdown_menu_li',
                     locals: { assignment: assignment,
                               current_user: @current_user} %>

          <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        { controller: 'assignments',
                          action: 'edit',
                          id: assignment.id },
                        title: assignment.description %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'edit',
                          id: assignment.id },
                        title: assignment.description %>
          <% end %>
        </li>
      <% end %>
    <% else %>
      <li>
        <% # If the current controller is criteria, we have to stay in the same
           # controller.
           if controller.controller_name == 'criteria'
          target_controller = 'criteria'
        else
          target_controller = controller.controller_name == 'assignments' ||
                  controller.controller_name == 'automated_tests' ? nil :
                  controller.controller_name
          target_action = controller.action_name == 'index' ||
                  controller.action_name == 'manage' ? nil :
                  controller.action_name
        end %>
        <% # If the current controller action is repo_browser, the drop down
           # menu for assignments should go to browse, and not repo_browser
           if target_action == 'repo_browser'
          target_action = 'browse'
           elsif target_action == 'update'
             target_action = 'edit'
           elsif target_action == 'create'
             target_action = 'new'
        end %>
        <% # Don't show hidden assignments in the dropdown menu for students
           # either. Append '(hidden)' for TAs and Admins.
           if !@current_user.student? %>

            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <% if assignment.is_hidden %>
            <%= link_to t('assignment.hidden',
                          assignment_text: h(assignment.short_identifier)),
                        polymorphic_url([assignment, target_controller],
                                        action: target_action),
                        title: assignment.description %>
          <% else %>
            <%= link_to h(assignment.short_identifier),
                        polymorphic_url([assignment, target_controller],
                                        action: target_action),
                        title: assignment.description %>
          <% end %>
        <% # student user, so show only non-hidden assignments
           else %>
          <% if !assignment.is_hidden %>
            <%= render partial: 'shared/pr_dropdown_menu_li',
                       locals: { assignment: assignment,
                                 current_user: @current_user} %>

            <%= link_to h(assignment.short_identifier),
                        { controller: 'assignments',
                          action: 'student_interface',
                          id: assignment.id },
                        title: assignment.description %>
{'fraction_non_alphanumeric': 0.10880913539967374, 'fraction_numerical': 0.0, 'mean_word_length': 1.4946083418107834, 'pattern_counts': {'":': 0, '<': 123, '<?xml version=': 0, '>': 123, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7584545', 'n_tokens_mistral': 3163, 'n_tokens_neox': 2905, 'n_words': 629}