Special topics rows on the Courses page have misaligned columns

Đang mở Phù hợp với người mới
#481 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 7 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
flask, html, python
Lĩnh vực
frontend

Hướng nghiên cứu

Mở app/templates/snips/courseElements/adminCourseTable.html và so sánh <td> của cột Course Materials trong dòng khóa học thông thường, gần dòng 142, với các dòng special topics quanh dòng 304-312, vốn chuyển thẳng từ faculty_credit sang LAST EDITED BY. Thêm ô Resources còn thiếu vào đó, sao chép văn bản dự phòng của dòng thông thường khi chưa có gì được đặt, và kiểm tra thứ tự các ô tiêu đề có khớp không. Sau đó chạy CAS cục bộ, vào Courses -> Spring 2022 -> African and African American Studies, và xác nhận một dòng special topics chưa được phê duyệt thẳng hàng với tiêu đề.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

On the Courses page (/courses/<term>/<program>), special topics rows have their columns shifted one to the left starting at the Resources column. Regular course rows look fine.

For example, on Spring 2022 / AFR, the row for "AFR 286 African Presence in Latin America" (status: Submitted) shows:

  • steeles (the last editor) under Resources instead of Last Edited
  • the edit/delete icons under Last Edited instead of the last column

This only happens for special topics that are not approved yet (e.g. Submitted). Approved special topics display correctly, because once approved they're stored in the Course table and use the regular row template (see the comment in app/controllers/main_routes/course.py: "We exclude the approved courses, because they'll be stored in the 'Course' table already"). So the bug is only in the special topics row template.

cas-special-topics-bug

Cause

In app/templates/snips/courseElements/adminCourseTable.html, regular course rows have a Course Materials <td> between Faculty Load and Last Edited (around line 142), but the special topics rows skip it and go straight from faculty_credit to LAST EDITED BY (around lines 304-312). So each special topics row has one fewer cell than the header.

Possible fix

Add a Resources <td> to the special topics rows between Faculty Load and Last Edited. If special topics don't have course materials stored, it could just show "Unspecified" like the regular rows do when nothing is set.

To reproduce

  1. Run CAS locally (dev container)
  2. Go to Courses -> Spring 2022 -> African and African American Studies
  3. Scroll to a special topics row that is not Approved yet (e.g. one with a "Submitted" badge) and compare its columns to the header
Ngôn ngữ chính
JavaScript
Star
0
Fork
3
Merge trung bình
8 ngày 5 giờ
Pull request đã merge (30 ngày)
6

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BCStudentSoftwareDevTeam/cas

Tất cả issue của BCStudentSoftwareDevTeam/cas

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.