<commit_before>- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.col-xs-12.user
          = display_user_image(current_user)
          = link_to_user(current_user)
        - if current_course_user.present? && !current_course_user.staff?
          = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
          = sidebar_items(controller.sidebar_items(type: :normal))

          - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
            h5 = t('.administration')
            = sidebar_items(admin_sidebar_items)

    div.col-lg-10.col-md-9.col-sm-8 class=page_class
      = yield<commit_msg>Save one SQL query when we already have the `current_course_user` is already registered.<commit_after>- layout = controller.parent_layout(of_layout: 'course') || controller.current_layout
= render within_layout: layout do
  = render_breadcrumbs
  div.row.course-layout
    div.col-lg-2.col-md-3.col-sm-4
      div.row
        div.col-xs-12.user
          = display_user_image(current_user)
          = link_to_user(current_course_user || current_user)
        - if current_course_user.present? && !current_course_user.staff?
          = display_course_user_badge(current_course_user)
      nav.navbar-default role='navigation'
        div.sidebar.collapse.navbar-collapse#course-navigation-sidebar
          = sidebar_items(controller.sidebar_items(type: :normal))

          - unless (admin_sidebar_items = controller.sidebar_items(type: :admin)).empty?
            h5 = t('.administration')
            = sidebar_items(admin_sidebar_items)

    div.col-lg-10.col-md-9.col-sm-8 class=page_class
      = yield
{'fraction_non_alphanumeric': 0.10885416666666667, 'fraction_numerical': 0.010416666666666666, 'mean_word_length': 3.1400862068965516, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4606305', 'n_tokens_mistral': 605, 'n_tokens_neox': 586, 'n_words': 82}