Component summary shows nothing when All Periods is selected

Đang mở Phù hợp với người mới
#2,401 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 1 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
78/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ệ
angular, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Lỗi nằm ở ComponentSummaryComponent.setComponent trong component-summary.component.ts, khoảng dòng 145, nơi hasStudentWork so sánh state.periodId với this.periodId. Hãy so sánh với kiểm tra chú thích điểm gần dòng 181, vốn đã coi -1 là tất cả các giai đoạn. Chạy spec của component summary, thêm một trường hợp với periodId -1 và bài làm của học sinh ở một giai đoạn nào đó, rồi xác nhận bản tóm tắt được hiển thị. Hoàn thành khi All Periods hiển thị bản tóm tắt giống như khi chỉ có một giai đoạn.

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

Mô tả

In Grade by Step, selecting "All Periods" hides the completion figure, the summary charts and the AI summaries of every component, even when students have submitted work. Selecting a single period shows them.

How to reproduce

  1. In a run with at least one period, have a student submit work on a component that has a summary (for example a Multiple Choice or Discussion step).
  2. As the teacher, open Grade by Step for that step with a single period selected: the summary appears.
  3. Switch the period selector to "All Periods": the summary disappears.

Cause

ComponentSummaryComponent.setComponent decides whether there is student work with state.periodId === this.periodId (component-summary.component.ts line 145). With All Periods selected periodId is -1, which no state has, so hasStudentWork is false. The same component already treats -1 as matching every period for score annotations (line 181).

Fix

Using the same period match the annotations use fixes it. The change is on my fork, Isaries/WISE-Client branch fix/component-summary-all-periods, and I can open a PR if that helps.

Ngôn ngữ chính
TypeScript
Star
4
Fork
8
Merge trung bình
3 ngày 8 giờ
Pull request đã merge (30 ngày)
12

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

  • Có Dockerfile hoặc 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 WISE-Community/WISE-Client

Tất cả issue của WISE-Community/WISE-Client

Issue tương tự

Thêm issue về TypeScript

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.