<commit_before><%-
  @body_classes ||= []
  keyboard_navigation = yield :keyboard_navigation
  left_side = nil
  left_side_custom = nil
  right_side = yield :right_side
  wizard = yield :wizard_box
  top_nav = yield :top_nav

  content_for :pre_html do
    @body_class_no_headers = @headers == false
    @show_fixed_bottom = (@fixed_warnings.present? || (@real_current_user && @real_current_user != @current_user)) && (!@body_class_no_headers || @outer_frame)
    @body_classes << "no-headers" if @body_class_no_headers
    unless (@body_classes.include? "no-headers") || (@show_left_side == false)
      left_side = yield :left_side
      left_side_custom = yield :left_side_custom
      @show_left_side ||= (section_tabs.length > 0 || left_side_custom.try(:length))
    end
    @body_classes << "with-left-side" if @show_left_side
    #we dont want to render a right side unless there is actually content in it.
    @body_classes << "with-right-side" if right_side and not right_side.strip.empty?
    @body_classes << "padless-content" if @padless
    @body_classes << 'with-fixed-bottom' if @show_fixed_bottom
    @body_classes << @active_tab
  end

-%>
<% content_for :head do %>
  <%= include_stylesheets :common, :media => "all" %>
  <% if @eportfolio_view === true %>
    <%= stylesheet_link_tag "compiled/instructure_eportfolio.css" %>
  <% end %>
<% end %>
<%= render :partial => "layouts/head" %>
<%= render :partial => 'shared/flash_notices' %>

<div id="header" class="no-print <%= 'no-user' unless @current_user %>">
  <div id="header-inner">
    <a href="#content" id="skip_navigation_link"><%= t 'links.skip_to_content', "Skip To Content" %></a>
    <a id="header-logo" href="<%= root_url %>"><%= t 'links.dashboard', "My Dashboard" %></a>
    <b id="header-logo-secondary"></b>
    <div id="topbar">
      <% if (identity = yield :identity) %>
        <%= identity %>
      <% else %>
        <%- cache_if(!@real_current_user, [@current_user || 'nobody', 'identity-15m'], :expires_in => 15.minutes) do -%>
          <%= render(:partial => 'shared/identity') %>
        <%- end -%>
      <% end %>
    </div>
    <%= render(:partial => "shared/keyboard_navigation_hint") if keyboard_navigation %>
    <% if @current_user %>
    <ul role="navigation" id="menu" aria-label="main">
      <%- cache([@current_user, 'home-menu-15m'], :expires_in => 15.minutes) do -%>
      <li id="courses_menu_item" class="menu-item">
        <%- if show_home_menu? -%>
          <%= render(:partial => 'shared/home_menu') %>
        <%- else  -%>
          <a href="<%= dashboard_path %>" class="menu-item-no-drop"><%= t 'links.home', 'Home' %></a>
        <%- end -%>
      </li>
      <%- end -%>
      <li id="assignments_menu_item" class="menu-item">
      <%
      # this will cache the assignments menu for 3 minutes.  the way it is right now it does 3 really expensive queries every page load.
      # to do this better we would either figure a better way to find needing_submitting, needing_grading, and recently_graded
      # or use delayed_job and memcache together to compute and cache it outside of the scope of a request
      # so by just caching this stupidly for 3 minutes, if there is a new thing that should show up in the last 3 minutes, it wont show up.
      cache([@current_user, 'assignments_menu'], :expires_in => 3.minutes) do %>
        <%# if there is anything inside the assignments drop down %>
      <%-
        max_to_show = 8
        assignment_sets = {
          :needing_submitting => t('menu.assignments_needing_submitting', "To Turn In"),
          :needing_grading    => t('menu.assignments_needing_grading', "To Grade"),
          :recently_graded    => t('menu.assignments_recently_graded', "Recently Graded")
        }
        total_shown = 0
        if assignment_sets.any?{ |k, v| @current_user.send("assignments_#{k}").length > 0 }
      -%>
        <a href="/assignments" class="menu-item-title"><%= t('menu.assignments', 'Assignments') %><span class="menu-item-title-icon"></span></a>
        <div class="menu-item-drop">
          <table cellspacing="0">
            <tr>
              <% assignment_sets.each do |k,v|
                  if (set = @current_user.send("assignments_#{k}")).length > 0
                    set = set[0,(max_to_show - total_shown)]
                    total_shown += set.length
                   %><%= render(:partial => "shared/menu_section", :locals => {
                                :max_to_show => max_to_show,
                                :more_link_for_over_max => assignments_path,
                                :collection => set,
                                :collection_size => total_shown >= max_to_show ? @current_user.send("assignments_#{k}_total_count"): set.length,
                                :partial => "shared/menu_assignment",
                                :key => k,
                                :title => v })  %>
                  <%
                  end
                end
              %>
            </tr>
          </table>
        </div>
        <%- else #there is not anything to show in the assignments drop down  -%>
        <a href="/assignments" class="menu-item-no-drop"><%= t('menu.assignments', 'Assignments') %></a>
        <%- end -%>
      <% end %>
      </li>
      <li id="grades_menu_item" class="menu-item">
        <%= link_to(t('menu.grades', 'Grades'), :grades, :class=>"menu-item-no-drop") %>
      </li>
      <li id="calendar_menu_item" class="menu-item">
        <a href="<%= calendar_path %>" class="menu-item-no-drop"><%= t('menu.calendar', 'Calendar') %></a>
      </li>
    </ul>
    <% end %>
  </div>
</div>
<div id="instructure_ajax_error_box">
  <div style="text-align: right; background-color: #fff;"><a href="#" class="close_instructure_ajax_error_box_link"><%= t('links.close', 'Close') %></a></div>
  <iframe id="instructure_ajax_error_result" src="about:blank" style="border: 0;"></iframe>
</div>

<div id="wrapper-container">
  <div id="wrapper">
    <% if @show_left_side %>
      <%# @left_side_list_view is temporary until we redo eportfolios %>
      <div id="left-side" class="<% if !@no_left_side_list_view %>list-view<% end %>">
      <% if left_side %>
        <%= left_side %>
      <% else %>
        <% if @context.try(:short_name) %>
          <h2 id="section-tabs-header">
            <%= @context.short_name %>
            <% if @context && @context.respond_to?(:context)  %>
              <a href="<%= url_for(@context.context) %>" id="section-tabs-header-subtitle" class="ellipsis"><%= @context.context.name %></a>
            <% elsif @context && @context.respond_to?(:enrollment_term) && !@context.enrollment_term.default_term? %>
              <span id="section-tabs-header-subtitle" class="ellipsis"><%= @context.enrollment_term.name %></span>
            <% end %>
          </h2>
        <% end %>
        <%= section_tabs %>
      <% end %>
      <% if left_side_custom %>
        <div class="left-side-inner">
          <%= left_side_custom %>
        </div>
      <% end %>
    </div>
    <% end %>
    <div id="main">
      <div id="right-side-wrapper">
        <aside id="right-side" role="complementary">
          <%= right_side %>
        </aside>
      </div>
      <div id="not_right_side">
        <div id="content-wrapper">
          <%= render_crumbs %>
          <div id="content" role="main">
            <%= yield %>
          </div>
        </div>
      </div>
    </div>
    <footer role="contentinfo" id="footer">
      <a href="http://www.instructure.com"><%= image_tag 'footer-logo.png', :alt => t('instructure_description', "Instructure, makers of the open source learning management system Canvas") %></a>
      <span id="footer-links">
        <% if Setting.get_cached("show_opensource_linkback", "false") == "true" %>
          <a href="http://instructure.com"><%= t('open_source_learning_management_system', 'Open Source LMS') %></a>
        <% end %>
        <%= help_link %>
        <%= render :partial => 'shared/footer_links' %>
      </span>
    </footer>
  </div>
</div>

<% if @show_fixed_bottom %>
  <%= render :partial => 'layouts/fixed_bottom' %>
<% end %>

<% if wizard %>
  <div id="wizard_spacer_box"></div>
  <div id="wizard_box" role="dialog" tabindex="-1">
    <div class="shadow shadow_1"></div>
    <div class="shadow shadow_3"></div>
    <div class="shadow shadow_5"></div>
    <div class="wizard_content">
      <div class="links">
        <a href="#" class="close_wizard_link close_link"><%= t('links.close', 'Close') %></a>
      </div>
      <%= wizard %>
    </div>
  </div>
<% end %>
<% if keyboard_navigation %>
  <div id="keyboard_navigation">
    <%= keyboard_navigation %>
  </div>
<% end %>
  <div style="display:none;"><!-- Everything inside of this should always stay hidden -->
    <div id="ajax_authenticity_token"><%= form_authenticity_token %></div>
    <div id="time_zone_offset"><%= ActiveSupport::TimeWithZone.new(Time.now.utc, Time.zone).utc_offset / -60 %></div>
    <% if @context && session && temp_type = session["role_#{@context.asset_string}"] %>
      <span id="switched_role_type" class="<%= @context.asset_string %>" data-role="<%= temp_type %>"><%= Enrollment.readable_type(temp_type) %></span>
    <% end %>
    <% if @page_view %>
      <a href="<%= page_view_path(@page_view.id || @page_view.temporary_id) %>" id="page_view_update_path">&nbsp;</a>
      <div id="page_view_id"><%= @page_view.id || @page_view.temporary_id %></div>
    <% end %>
    <div id="domain_root_account_id"><%= @domain_root_account.try(:id) %></div>
    <% if equella_enabled? %>
      <a id="equella_endpoint_url" href="<%= @equella_settings.endpoint %>">&nbsp;</a>
      <a id="equella_callback_url" href="<%= external_content_success_url('equella') %>">&nbsp;</a>
      <a id="equella_cancel_url" href="<%= external_content_cancel_url('equella') %>">&nbsp;</a>
      <a id="equella_action" href="<%= @equella_settings.default_action %>">&nbsp;</a>
      <% if @equella_settings.teaser %>
        <div id="equella_teaser"><%= @equella_settings.teaser %></div>
      <% end %>
    <% end %>
  </div>
<% cache('global_dialogs_render') do %>
  <%= render :partial => "shared/global_dialogs" %>
<% end %>

<%= render :partial => 'layouts/foot', :locals => { :include_common_bundle => true } %>
<commit_msg>change label on main navigation.<commit_after><%-
  @body_classes ||= []
  keyboard_navigation = yield :keyboard_navigation
  left_side = nil
  left_side_custom = nil
  right_side = yield :right_side
  wizard = yield :wizard_box
  top_nav = yield :top_nav

  content_for :pre_html do
    @body_class_no_headers = @headers == false
    @show_fixed_bottom = (@fixed_warnings.present? || (@real_current_user && @real_current_user != @current_user)) && (!@body_class_no_headers || @outer_frame)
    @body_classes << "no-headers" if @body_class_no_headers
    unless (@body_classes.include? "no-headers") || (@show_left_side == false)
      left_side = yield :left_side
      left_side_custom = yield :left_side_custom
      @show_left_side ||= (section_tabs.length > 0 || left_side_custom.try(:length))
    end
    @body_classes << "with-left-side" if @show_left_side
    #we dont want to render a right side unless there is actually content in it.
    @body_classes << "with-right-side" if right_side and not right_side.strip.empty?
    @body_classes << "padless-content" if @padless
    @body_classes << 'with-fixed-bottom' if @show_fixed_bottom
    @body_classes << @active_tab
  end

-%>
<% content_for :head do %>
  <%= include_stylesheets :common, :media => "all" %>
  <% if @eportfolio_view === true %>
    <%= stylesheet_link_tag "compiled/instructure_eportfolio.css" %>
  <% end %>
<% end %>
<%= render :partial => "layouts/head" %>
<%= render :partial => 'shared/flash_notices' %>

<div id="header" class="no-print <%= 'no-user' unless @current_user %>">
  <div id="header-inner">
    <a href="#content" id="skip_navigation_link"><%= t 'links.skip_to_content', "Skip To Content" %></a>
    <a id="header-logo" href="<%= root_url %>"><%= t 'links.dashboard', "My Dashboard" %></a>
    <b id="header-logo-secondary"></b>
    <div id="topbar">
      <% if (identity = yield :identity) %>
        <%= identity %>
      <% else %>
        <%- cache_if(!@real_current_user, [@current_user || 'nobody', 'identity-15m'], :expires_in => 15.minutes) do -%>
          <%= render(:partial => 'shared/identity') %>
        <%- end -%>
      <% end %>
    </div>
    <%= render(:partial => "shared/keyboard_navigation_hint") if keyboard_navigation %>
    <% if @current_user %>
    <ul role="navigation" id="menu" aria-label="<%= t('navigation.main', 'Main Navigation') %>">
      <%- cache([@current_user, 'home-menu-15m'], :expires_in => 15.minutes) do -%>
      <li id="courses_menu_item" class="menu-item">
        <%- if show_home_menu? -%>
          <%= render(:partial => 'shared/home_menu') %>
        <%- else  -%>
          <a href="<%= dashboard_path %>" class="menu-item-no-drop"><%= t 'links.home', 'Home' %></a>
        <%- end -%>
      </li>
      <%- end -%>
      <li id="assignments_menu_item" class="menu-item">
      <%
      # this will cache the assignments menu for 3 minutes.  the way it is right now it does 3 really expensive queries every page load.
      # to do this better we would either figure a better way to find needing_submitting, needing_grading, and recently_graded
      # or use delayed_job and memcache together to compute and cache it outside of the scope of a request
      # so by just caching this stupidly for 3 minutes, if there is a new thing that should show up in the last 3 minutes, it wont show up.
      cache([@current_user, 'assignments_menu'], :expires_in => 3.minutes) do %>
        <%# if there is anything inside the assignments drop down %>
      <%-
        max_to_show = 8
        assignment_sets = {
          :needing_submitting => t('menu.assignments_needing_submitting', "To Turn In"),
          :needing_grading    => t('menu.assignments_needing_grading', "To Grade"),
          :recently_graded    => t('menu.assignments_recently_graded', "Recently Graded")
        }
        total_shown = 0
        if assignment_sets.any?{ |k, v| @current_user.send("assignments_#{k}").length > 0 }
      -%>
        <a href="/assignments" class="menu-item-title"><%= t('menu.assignments', 'Assignments') %><span class="menu-item-title-icon"></span></a>
        <div class="menu-item-drop">
          <table cellspacing="0">
            <tr>
              <% assignment_sets.each do |k,v|
                  if (set = @current_user.send("assignments_#{k}")).length > 0
                    set = set[0,(max_to_show - total_shown)]
                    total_shown += set.length
                   %><%= render(:partial => "shared/menu_section", :locals => {
                                :max_to_show => max_to_show,
                                :more_link_for_over_max => assignments_path,
                                :collection => set,
                                :collection_size => total_shown >= max_to_show ? @current_user.send("assignments_#{k}_total_count"): set.length,
                                :partial => "shared/menu_assignment",
                                :key => k,
                                :title => v })  %>
                  <%
                  end
                end
              %>
            </tr>
          </table>
        </div>
        <%- else #there is not anything to show in the assignments drop down  -%>
        <a href="/assignments" class="menu-item-no-drop"><%= t('menu.assignments', 'Assignments') %></a>
        <%- end -%>
      <% end %>
      </li>
      <li id="grades_menu_item" class="menu-item">
        <%= link_to(t('menu.grades', 'Grades'), :grades, :class=>"menu-item-no-drop") %>
      </li>
      <li id="calendar_menu_item" class="menu-item">
        <a href="<%= calendar_path %>" class="menu-item-no-drop"><%= t('menu.calendar', 'Calendar') %></a>
      </li>
    </ul>
    <% end %>
  </div>
</div>
<div id="instructure_ajax_error_box">
  <div style="text-align: right; background-color: #fff;"><a href="#" class="close_instructure_ajax_error_box_link"><%= t('links.close', 'Close') %></a></div>
  <iframe id="instructure_ajax_error_result" src="about:blank" style="border: 0;"></iframe>
</div>

<div id="wrapper-container">
  <div id="wrapper">
    <% if @show_left_side %>
      <%# @left_side_list_view is temporary until we redo eportfolios %>
      <div id="left-side" class="<% if !@no_left_side_list_view %>list-view<% end %>">
      <% if left_side %>
        <%= left_side %>
      <% else %>
        <% if @context.try(:short_name) %>
          <h2 id="section-tabs-header">
            <%= @context.short_name %>
            <% if @context && @context.respond_to?(:context)  %>
              <a href="<%= url_for(@context.context) %>" id="section-tabs-header-subtitle" class="ellipsis"><%= @context.context.name %></a>
            <% elsif @context && @context.respond_to?(:enrollment_term) && !@context.enrollment_term.default_term? %>
              <span id="section-tabs-header-subtitle" class="ellipsis"><%= @context.enrollment_term.name %></span>
            <% end %>
          </h2>
        <% end %>
        <%= section_tabs %>
      <% end %>
      <% if left_side_custom %>
        <div class="left-side-inner">
          <%= left_side_custom %>
        </div>
      <% end %>
    </div>
    <% end %>
    <div id="main">
      <div id="right-side-wrapper">
        <aside id="right-side" role="complementary">
          <%= right_side %>
        </aside>
      </div>
      <div id="not_right_side">
        <div id="content-wrapper">
          <%= render_crumbs %>
          <div id="content" role="main">
            <%= yield %>
          </div>
        </div>
      </div>
    </div>
    <footer role="contentinfo" id="footer">
      <a href="http://www.instructure.com"><%= image_tag 'footer-logo.png', :alt => t('instructure_description', "Instructure, makers of the open source learning management system Canvas") %></a>
      <span id="footer-links">
        <% if Setting.get_cached("show_opensource_linkback", "false") == "true" %>
          <a href="http://instructure.com"><%= t('open_source_learning_management_system', 'Open Source LMS') %></a>
        <% end %>
        <%= help_link %>
        <%= render :partial => 'shared/footer_links' %>
      </span>
    </footer>
  </div>
</div>

<% if @show_fixed_bottom %>
  <%= render :partial => 'layouts/fixed_bottom' %>
<% end %>

<% if wizard %>
  <div id="wizard_spacer_box"></div>
  <div id="wizard_box" role="dialog" tabindex="-1">
    <div class="shadow shadow_1"></div>
    <div class="shadow shadow_3"></div>
    <div class="shadow shadow_5"></div>
    <div class="wizard_content">
      <div class="links">
        <a href="#" class="close_wizard_link close_link"><%= t('links.close', 'Close') %></a>
      </div>
      <%= wizard %>
    </div>
  </div>
<% end %>
<% if keyboard_navigation %>
  <div id="keyboard_navigation">
    <%= keyboard_navigation %>
  </div>
<% end %>
  <div style="display:none;"><!-- Everything inside of this should always stay hidden -->
    <div id="ajax_authenticity_token"><%= form_authenticity_token %></div>
    <div id="time_zone_offset"><%= ActiveSupport::TimeWithZone.new(Time.now.utc, Time.zone).utc_offset / -60 %></div>
    <% if @context && session && temp_type = session["role_#{@context.asset_string}"] %>
      <span id="switched_role_type" class="<%= @context.asset_string %>" data-role="<%= temp_type %>"><%= Enrollment.readable_type(temp_type) %></span>
    <% end %>
    <% if @page_view %>
      <a href="<%= page_view_path(@page_view.id || @page_view.temporary_id) %>" id="page_view_update_path">&nbsp;</a>
      <div id="page_view_id"><%= @page_view.id || @page_view.temporary_id %></div>
    <% end %>
    <div id="domain_root_account_id"><%= @domain_root_account.try(:id) %></div>
    <% if equella_enabled? %>
      <a id="equella_endpoint_url" href="<%= @equella_settings.endpoint %>">&nbsp;</a>
      <a id="equella_callback_url" href="<%= external_content_success_url('equella') %>">&nbsp;</a>
      <a id="equella_cancel_url" href="<%= external_content_cancel_url('equella') %>">&nbsp;</a>
      <a id="equella_action" href="<%= @equella_settings.default_action %>">&nbsp;</a>
      <% if @equella_settings.teaser %>
        <div id="equella_teaser"><%= @equella_settings.teaser %></div>
      <% end %>
    <% end %>
  </div>
<% cache('global_dialogs_render') do %>
  <%= render :partial => "shared/global_dialogs" %>
<% end %>

<%= render :partial => 'layouts/foot', :locals => { :include_common_bundle => true } %>

{'fraction_non_alphanumeric': 0.18045040266190868, 'fraction_numerical': 0.0027969330182765107, 'mean_word_length': 2.8425050954233835, 'pattern_counts': {'":': 0, '<': 498, '<?xml version=': 0, '>': 540, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '915994', 'n_tokens_mistral': 7132, 'n_tokens_neox': 6648, 'n_words': 1399}