<commit_before>.col-lg-12
- cache current_student_data.cache_key('v1', current_user.is_staff?, :assignments_key, :grades_key, :submissions_key) do
  - current_course_data.by_assignment_type.each do |assignment_type, assignments|
    .col-lg-12.col-xs-12.col-md-12.col-sm-12
      - if assignment_type.max_value?
        %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#assignment_type-#{assignment_type.id}", "data-toggle" => "collapse"} #{assignment_type.try(:name)} • #{ points current_student_data.score_for_assignment_type(assignment_type) }/#{points assignment_type.max_value}
      - else
        %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#assignment_type-#{assignment_type.id}", "data-toggle" => "collapse"} #{assignment_type.try(:name)} • #{ points current_student_data.score_for_assignment_type(assignment_type) }/#{points current_student_data.point_total_for_assignment_type(assignment_type)}
      .collapse{:id => "assignment_type-#{assignment_type.id}"}
        .col-lg-10
          - if assignment_type.predictor_description?
            = raw assignment_type.predictor_description
        - if assignment_type.student_weightable? && current_course.assignment_weight_open?
          .col-lg-2
            - if current_student_data.weighted_assignments?
              .badge.badge-primary= "#{current_student_data.weight_for_assignment_type(assignment_type)} #{term_for :weights}"
              .badge.badge-info= link_to "Change #{term_for :weights}", assignment_type_weights_path(:student_id => current_student.id), assignment_type: assignment_type, user_id: current_student
            - else
              .badge.badge-info= link_to "Set #{term_for :weights}", assignment_type_weights_path(:student_id => current_student.id), assignment_type: assignment_type
        - elsif assignment_type.student_weightable?
          .badge.badge-primary= "#{current_student_data.weight_for_assignment_type(assignment_type)} #{term_for :weights}"
        .clear
        %p
        .col-lg-12
          - assignments.each do |assignment|
            .col.col-lg-12.col-sm-12.col-xs-12.col-md-12.clear
              %span.assignmentName= link_to assignment.name, assignment_path(assignment, :student_id => current_student)
              - if current_student_data.grade_released_for_assignment?(assignment)
                %span.points.earned= "#{points current_student_data.score_for_assignment(assignment)}  / "
              %span.points.total #{points current_student_data.point_total_for_assignment(assignment)} points
              - if assignment.assignment_type.student_weightable?
                = "(Multiplied) "
                %b= "–"
                - if current_student_data.grade_released_for_assignment?(assignment)
                  - grade = current_student_data.grade_for_assignment(assignment)
                  %span.points.earned= points grade.raw_score
                  %span.points= "/"
                %span.points= points assignment.point_total
                %span.points points (Raw)
              %span
              - if assignment.future?
                %span.bold= " • Due: #{assignment.due_at.strftime("%A, %B %d, %l:%M%p")}"
              - if assignment.is_required?
                %span.label.label-important Required!
              - if assignment.self_gradeable? && assignment.open? && assignment_type.name == 'Attendance' && current_user.is_student?
                = simple_form_for current_student_data.grade_for_assignment(assignment), :url => self_log_grades_assignment_path(assignment), :method => :post do |f|
                  - present = current_student_data.present_for_class?(assignment)
                  = hidden_field_tag :present, !present
                  = f.submit (present ? assignment_type.student_logged_revert_button_text : assignment_type.student_logged_button_text), :class => "btn #{present ? 'btn-warning' : 'btn-success'} btn-tiny"
              - if assignment.has_groups?
                - if current_student.group_for_assignment(assignment)
                  = link_to "See Group", group_path(current_student.group_for_assignment(assignment)), :class => "btn btn-primary btn-xs"
                  - if assignment.accepts_submissions?
                    = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)
                - else
                  = link_to "Create a Group", new_group_path, :class => "btn btn-primary btn-xs"
              - else
                - if assignment.accepts_submissions?
                  = render "students/submissions", assignment: assignment
              - if current_student_data.grade_released_for_assignment?(assignment) && current_student_data.grade_for_assignment(assignment).feedback?
                = link_to "See Feedback", assignment_grade_path(assignment, :student_id => current_student), :class => "btn btn-info btn-xs"
              - if current_user.is_staff?
                - if assignment.is_individual?
                  - if current_student_data.grade_released_for_assignment?(assignment)
                    - grade = current_student_data.grade_for_assignment(assignment)
                    = link_to "Edit Grade", edit_assignment_grade_path(assignment.id, :student_id => current_student.id), :class => 'btn btn-xs btn-info'
                  - else
                    = link_to 'Grade', edit_assignment_grade_path("assignment_id"=>assignment.id, :student_id => current_student.id), :class => 'btn btn-xs btn-success'
                - elsif assignment.has_groups?
                  - if current_student_data.grade_released_for_assignment?(assignment)
                    - grade = current_student_data.grade_for_assignment(assignment)
                    = link_to "Edit Grade", group_grade_assignment_path(assignment, :group_id => current_student.group_for_assignment(assignment)), :class => 'btn btn-xs btn-info'
                  - else
                    = link_to 'Grade', group_grade_assignment_path("assignment_id"=>assignment.id, :group_id => current_student.group_for_assignment(assignment)), :class => 'btn btn-xs btn-success'

        %hr
  - if current_course.team_challenges?
    .col-lg-12.col-xs-12.col-md-12.col-sm-12
      %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#challenges", "data-toggle" => "collapse"} #{term_for :challenges} #{ points current_student.team_for_course(current_course).try(:challenge_grade_score) }/#{points current_course_data.point_total_for_challenges}
      .collapse{:id => "challenges"}
        .col-lg-12
          - current_course_data.challenges.each do |challenge|<commit_msg>Hide invisible assignments on the student dashboard<commit_after>.col-lg-12
- cache current_student_data.cache_key('v1', current_user.is_staff?, :assignments_key, :grades_key, :submissions_key) do
  - current_course_data.by_assignment_type.each do |assignment_type, assignments|
    .col-lg-12.col-xs-12.col-md-12.col-sm-12
      - if assignment_type.max_value?
        %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#assignment_type-#{assignment_type.id}", "data-toggle" => "collapse"} #{assignment_type.try(:name)} • #{ points current_student_data.score_for_assignment_type(assignment_type) }/#{points assignment_type.max_value}
      - else
        %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#assignment_type-#{assignment_type.id}", "data-toggle" => "collapse"} #{assignment_type.try(:name)} • #{ points current_student_data.score_for_assignment_type(assignment_type) }/#{points current_student_data.point_total_for_assignment_type(assignment_type)}
      .collapse{:id => "assignment_type-#{assignment_type.id}"}
        .col-lg-10
          - if assignment_type.predictor_description?
            = raw assignment_type.predictor_description
        - if assignment_type.student_weightable? && current_course.assignment_weight_open?
          .col-lg-2
            - if current_student_data.weighted_assignments?
              .badge.badge-primary= "#{current_student_data.weight_for_assignment_type(assignment_type)} #{term_for :weights}"
              .badge.badge-info= link_to "Change #{term_for :weights}", assignment_type_weights_path(:student_id => current_student.id), assignment_type: assignment_type, user_id: current_student
            - else
              .badge.badge-info= link_to "Set #{term_for :weights}", assignment_type_weights_path(:student_id => current_student.id), assignment_type: assignment_type
        - elsif assignment_type.student_weightable?
          .badge.badge-primary= "#{current_student_data.weight_for_assignment_type(assignment_type)} #{term_for :weights}"
        .clear
        %p
        .col-lg-12
          - assignments.each do |assignment|
            - if assignment.visible? || current_student_data.grade_released_for_assignment?(assignment)
              .col.col-lg-12.col-sm-12.col-xs-12.col-md-12.clear
                %span.assignmentName= link_to assignment.name, assignment_path(assignment, :student_id => current_student)
                - if current_student_data.grade_released_for_assignment?(assignment)
                  %span.points.earned= "#{points current_student_data.score_for_assignment(assignment)}  / "
                %span.points.total #{points current_student_data.point_total_for_assignment(assignment)} points
                - if assignment.assignment_type.student_weightable?
                  = "(Multiplied) "
                  %b= "–"
                  - if current_student_data.grade_released_for_assignment?(assignment)
                    - grade = current_student_data.grade_for_assignment(assignment)
                    %span.points.earned= points grade.raw_score
                    %span.points= "/"
                  %span.points= points assignment.point_total
                  %span.points points (Raw)
                %span
                - if assignment.future?
                  %span.bold= " • Due: #{assignment.due_at.strftime("%A, %B %d, %l:%M%p")}"
                - if assignment.is_required?
                  %span.label.label-important Required!
                - if assignment.self_gradeable? && assignment.open? && assignment_type.name == 'Attendance' && current_user.is_student?
                  = simple_form_for current_student_data.grade_for_assignment(assignment), :url => self_log_grades_assignment_path(assignment), :method => :post do |f|
                    - present = current_student_data.present_for_class?(assignment)
                    = hidden_field_tag :present, !present
                    = f.submit (present ? assignment_type.student_logged_revert_button_text : assignment_type.student_logged_button_text), :class => "btn #{present ? 'btn-warning' : 'btn-success'} btn-tiny"
                - if assignment.has_groups?
                  - if current_student.group_for_assignment(assignment)
                    = link_to "See Group", group_path(current_student.group_for_assignment(assignment)), :class => "btn btn-primary btn-xs"
                    - if assignment.accepts_submissions?
                      = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)
                  - else
                    = link_to "Create a Group", new_group_path, :class => "btn btn-primary btn-xs"
                - else
                  - if assignment.accepts_submissions?
                    = render "students/submissions", assignment: assignment
                - if current_student_data.grade_released_for_assignment?(assignment) && current_student_data.grade_for_assignment(assignment).feedback?
                  = link_to "See Feedback", assignment_grade_path(assignment, :student_id => current_student), :class => "btn btn-info btn-xs"
                - if current_user.is_staff?
                  - if assignment.is_individual?
                    - if current_student_data.grade_released_for_assignment?(assignment)
                      - grade = current_student_data.grade_for_assignment(assignment)
                      = link_to "Edit Grade", edit_assignment_grade_path(assignment.id, :student_id => current_student.id), :class => 'btn btn-xs btn-info'
                    - else
                      = link_to 'Grade', edit_assignment_grade_path("assignment_id"=>assignment.id, :student_id => current_student.id), :class => 'btn btn-xs btn-success'
                  - elsif assignment.has_groups?
                    - if current_student_data.grade_released_for_assignment?(assignment)
                      - grade = current_student_data.grade_for_assignment(assignment)
                      = link_to "Edit Grade", group_grade_assignment_path(assignment, :group_id => current_student.group_for_assignment(assignment)), :class => 'btn btn-xs btn-info'
                    - else
                      = link_to 'Grade', group_grade_assignment_path("assignment_id"=>assignment.id, :group_id => current_student.group_for_assignment(assignment)), :class => 'btn btn-xs btn-success'

        %hr
  - if current_course.team_challenges?
    .col-lg-12.col-xs-12.col-md-12.col-sm-12
      %button.btn.btn-success.col.col-xs-12.col-md-12.col-sm-12.col-lg-12{"data-target" => "#challenges", "data-toggle" => "collapse"} #{term_for :challenges} #{ points current_student.team_for_course(current_course).try(:challenge_grade_score) }/#{points current_course_data.point_total_for_challenges}
      .collapse{:id => "challenges"}
        .col-lg-12
          - current_course_data.challenges.each do |challenge|
{'fraction_non_alphanumeric': 0.11479109040617266, 'fraction_numerical': 0.00844373271218518, 'mean_word_length': 2.8430769230769233, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3085947', 'n_tokens_mistral': 4230, 'n_tokens_neox': 4043, 'n_words': 584}