<commit_before>- if current_user_is_staff?
  = form_tag edit_status_grades_assignment_path(@assignment) do
    - @groups.each do |group|
      %h4.subtitle
        = "#{group.name} Grades"
      .small-12.columns
        %h5.section-title
          - group.submission_for_assignment(@assignment).tap do |submission|
            - if submission
              = link_to "See Submission", assignment_grade_path(@assignment.id, :group_id => group.id), :class => 'button radius'
            - else
              = link_to "Submit", new_assignment_submission_path(@assignment, @submission, :group_id => group.id), :class => 'button radius'
          - if group.students.first.grade_for_assignment(@assignment).present?
            = link_to "Edit Grade", group_grade_assignment_path(@assignment, :group_id => group), :class => 'button radius'
          - else
            = link_to "Grade", group_grade_assignment_path(@assignment, :group_id => group), :class => 'button radius'

      .small-12.columns
        %table.responsive.nofeatures_dynatable.no_radius
          %thead
            %tr
              %th= current_course.group_term
              %th Score
              - if @assignment.assignment_type.student_weightable?
                %th Multiplied Scores
              - if @assignment.has_levels?
                %th Level
              - if @assignment.release_necessary?
                %th Status
                %th
                  .button-bar
                    %ul.button-group.right.radius
                      %li
                        %button.button.select-all.tiny= "Check All"
                      %li
                        %button.button.select-none.tiny= "Uncheck All"
          %tbody
            - group.students.each do |student|
              - grade = @assignment.grades.find_by student_id: student
              %tr
                %td= link_to student.name, student_path(student)
                %td
                  - if grade.present? && grade.instructor_modified?
                    = points grade.raw_score
                - if @assignment.assignment_type.student_weightable?
                  %td= points grade.score if grade
                - if @assignment.has_levels?
                  %td
                    - if grade
                      = @assignment.grade_level(grade)
                - if @assignment.release_necessary?
                  %td= grade.try(:status)
                  %td.right
                    - if grade && grade.is_graded?
                      = check_box_tag "grade_ids[]", grade.id
      .right.columns
        - if @assignment.release_necessary? && @assignment.grades.present?
          = submit_tag "Update Grade Statuses", :class => "button"
- else
  - if current_student.group_for_assignment(@assignment)
    %h3
      = "#{term_for :group}: #{current_student.group_for_assignment(@assignment).name}"

    %hr
<commit_msg>Add read state to group table for staff to view<commit_after>- if current_user_is_staff?
  = form_tag edit_status_grades_assignment_path(@assignment) do
    - @groups.each do |group|
      %h4.subtitle
        = "#{group.name} Grades"
      .small-12.columns
        %h5.section-title
          - group.submission_for_assignment(@assignment).tap do |submission|
            - if submission
              = link_to "See Submission", assignment_grade_path(@assignment.id, :group_id => group.id), :class => 'button radius'
            - else
              = link_to "Submit", new_assignment_submission_path(@assignment, @submission, :group_id => group.id), :class => 'button radius'
          - if group.students.first.grade_for_assignment(@assignment).present?
            = link_to "Edit Grade", group_grade_assignment_path(@assignment, :group_id => group), :class => 'button radius'
          - else
            = link_to "Grade", group_grade_assignment_path(@assignment, :group_id => group), :class => 'button radius'

      .small-12.columns
        %table.responsive.nofeatures_dynatable.no_radius
          %thead
            %tr
              %th= current_course.group_term
              %th Score
              %th Read?
              - if @assignment.assignment_type.student_weightable?
                %th Multiplied Scores
              - if @assignment.has_levels?
                %th Level
              - if @assignment.release_necessary?
                %th Status
                %th
                  .button-bar
                    %ul.button-group.right.radius
                      %li
                        %button.button.select-all.tiny= "Check All"
                      %li
                        %button.button.select-none.tiny= "Uncheck All"
          %tbody
            - group.students.each do |student|
              - grade = @assignment.grades.find_by student_id: student
              %tr
                %td= link_to student.name, student_path(student)
                %td
                  - if grade.present? && grade.instructor_modified?
                    = points grade.raw_score
                %td
                  - if grade.present?
                    - if grade.feedback_read?
                      %i.fa.fa-check
                    - elsif grade.feedback_reviewed?
                      %i.fa.fa-eye
                - if @assignment.assignment_type.student_weightable?
                  %td= points grade.score if grade
                - if @assignment.has_levels?
                  %td
                    - if grade
                      = @assignment.grade_level(grade)
                - if @assignment.release_necessary?
                  %td= grade.try(:status)
                  %td.right
                    - if grade && grade.is_graded?
                      = check_box_tag "grade_ids[]", grade.id
      .right.columns
        - if @assignment.release_necessary? && @assignment.grades.present?
          = submit_tag "Update Grade Statuses", :class => "button"
- else
  - if current_student.group_for_assignment(@assignment)
    %h3
      = "#{term_for :group}: #{current_student.group_for_assignment(@assignment).name}"

    %hr

{'fraction_non_alphanumeric': 0.09981940568051223, 'fraction_numerical': 0.0022984731571170577, 'mean_word_length': 1.594548551959114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '1442581', 'n_tokens_mistral': 1719, 'n_tokens_neox': 1633, 'n_words': 322}