<commit_before>- add_breadcrumb format_inline_text(@assessment.title)
= page_header format_inline_text(@assessment.title) do
  div.btn-group
    = edit_button([current_course, @assessment])
    = delete_button([current_course, @assessment])

= div_for(@assessment) do
  h2 = t('.description')
  = format_html(@assessment.description)

  table.table.table-bordered.details-table
    tbody
      tr.maximum_experience_points
        th = t('.maximum_experience_points')
        td = @assessment.base_exp + @assessment.time_bonus_exp + @assessment.extra_bonus_exp
      /tr.maximum_grade
        th = ('.maximum_grade')
        td = @assessment.maximum_grade
      tr.start_at
        th = t('.start_at')
        td = format_datetime(@assessment.start_at)
      tr.end_at
        th = t('.end_at')
        td = format_datetime(@assessment.end_at) if @assessment.end_at.present?

  h2 = t('.finish_to_unlock')
  = render partial: @assessment.assessment_conditions.includes(:conditional), suffix: 'condition'

  h2 = t('.files')
  = render partial: 'layouts/materials', locals: { folder: @assessment.folder }

  div.pull-right
    div.dropdown
      button.btn.btn-info.dropdown-toggle#new-question [type='button' data-toggle='dropdown'
                                                        aria-expanded='true']
        => t('common.new')
        span.caret
      ul.dropdown-menu.dropdown-menu-right role='menu' aria-labelledby='new-question'
        li role='presentation'
          = link_to(t('.new_question.multiple_choice'),
                    new_course_assessment_question_multiple_response_path(current_course, @assessment,
                                                                          { multiple_choice: true }),
                    role: 'menuitem')
        li role='presentation'
          = link_to(t('.new_question.multiple_response'),
                    new_course_assessment_question_multiple_response_path(current_course, @assessment),
                    role: 'menuitem')
        li role='presentation'
          = link_to(t('.new_question.text_response'),
                    new_course_assessment_question_text_response_path(current_course, @assessment),
                    role: 'menuitem')
        li role='presentation'
          = link_to(t('.new_question.programming'),
                    new_course_assessment_question_programming_path(current_course, @assessment),
                    role: 'menuitem')
  h2 = t('.questions')

  = render @assessment.questions.map(&:specific)<commit_msg>Hide assessment management buttons from students.<commit_after>- add_breadcrumb format_inline_text(@assessment.title)
= page_header format_inline_text(@assessment.title) do
  - if can?(:manage, @assessment)
    div.btn-group
      = edit_button([current_course, @assessment])
      = delete_button([current_course, @assessment])

= div_for(@assessment) do
  h2 = t('.description')
  = format_html(@assessment.description)

  table.table.table-bordered.details-table
    tbody
      tr.maximum_experience_points
        th = t('.maximum_experience_points')
        td = @assessment.base_exp + @assessment.time_bonus_exp + @assessment.extra_bonus_exp
      /tr.maximum_grade
        th = ('.maximum_grade')
        td = @assessment.maximum_grade
      tr.start_at
        th = t('.start_at')
        td = format_datetime(@assessment.start_at)
      tr.end_at
        th = t('.end_at')
        td = format_datetime(@assessment.end_at) if @assessment.end_at.present?

  h2 = t('.finish_to_unlock')
  = render partial: @assessment.assessment_conditions.includes(:conditional), suffix: 'condition'

  - if can?(:attempt, @assessment)
    h2 = t('.files')
    = render partial: 'layouts/materials', locals: { folder: @assessment.folder }

  - if can?(:manage, @assessment)
    div.pull-right
      div.dropdown
        button.btn.btn-info.dropdown-toggle#new-question [type='button' data-toggle='dropdown'
                                                          aria-expanded='true']
          => t('common.new')
          span.caret
        ul.dropdown-menu.dropdown-menu-right role='menu' aria-labelledby='new-question'
          li role='presentation'
            = link_to(t('.new_question.multiple_choice'),
                      new_course_assessment_question_multiple_response_path(current_course, @assessment,
                                                                            { multiple_choice: true }),
                      role: 'menuitem')
          li role='presentation'
            = link_to(t('.new_question.multiple_response'),
                      new_course_assessment_question_multiple_response_path(current_course, @assessment),
                      role: 'menuitem')
          li role='presentation'
            = link_to(t('.new_question.text_response'),
                      new_course_assessment_question_text_response_path(current_course, @assessment),
                      role: 'menuitem')
          li role='presentation'
            = link_to(t('.new_question.programming'),
                      new_course_assessment_question_programming_path(current_course, @assessment),
                      role: 'menuitem')
    h2 = t('.questions')

    = render @assessment.questions.map(&:specific)
{'fraction_non_alphanumeric': 0.11294922989161438, 'fraction_numerical': 0.0015212017493820118, 'mean_word_length': 2.4379084967320264, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '132243', 'n_tokens_mistral': 1512, 'n_tokens_neox': 1451, 'n_words': 217}