.col.col-lg-12.col-md-12.col-sm-12.col-xs-12.center.badge-info#todo{"data-target" => "#toDoList", "data-toggle" => "collapse"}
  %h4.center Due This Week
  %div{:id => "toDoList", :class => "collapse clear"}
    - current_course_data.by_assignment_type.each do |assignment_type, assignments|
      -# Do not use `assignment_type.has_soon_assignments?' It will trigger a query.
      - if assignments.any?(&:soon?) && assignment_type.name != "Attendance"
        %h5= "#{assignment_type.try(:name)}"
        - assignments.each do |assignment|
          - if assignment.soon?
            - if current_student_data.submission_for_assignment?(assignment)
              %div.submitted
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - else
              %div
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - if assignment.accepts_submissions?
              - if assignment.is_individual?
                = render "students/submissions", assignment: assignment
              - else
                = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)

.col.col-lg-12.col-md-12.col-sm-12.col-xs-12.center.badge-info#todo{"data-target" => "#toDoList", "data-toggle" => "collapse"}
  %h4.center Due This Week
  %div{:id => "toDoList", :class => "collapse clear"}
    - current_course_data.by_assignment_type.each do |assignment_type, assignments|
      -# Do not use `assignment_type.has_soon_assignments?' It will trigger a query.
      - if assignments.any?(&:soon?) && assignment_type.name != "Attendance"
        %h5= "#{assignment_type.try(:name)}"
        - assignments.each do |assignment|
          - if assignment.soon? && assignment.visible?
            - if current_student_data.submission_for_assignment?(assignment)
              %div.submitted
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - else
              %div
                = "#{assignment.try(:name)}"
                .bold= "Due: #{assignment.try(:due_at).strftime("%b-%d")}"
            - if assignment.accepts_submissions?
              - if assignment.is_individual?
                = render "students/submissions", assignment: assignment
              - else
                = render "students/group_submissions", assignment: assignment, group: current_student.group_for_assignment(assignment)

Hide invisible assignments on the to do list
Hide invisible assignments on the to do list
