listCourses has a feature/bug -- can't update a course whose course_user table has gone missing

Đang mở
#1,440 3 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 4 ngày

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
docker, perl
Lĩnh vực
backend, databases

Hướng nghiên cứu

The course listing logic that filters candidates for the upgrade-course page is the starting point; the issue quotes the Perl readDirectory grep that lists directories under the courses directory. Read how the upgrade course page builds its candidate list and how it checks for the course_user table. Done would mean the upgrade page lists course directories even when their database tables are missing, without changing any database until the user confirms.

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

Mô tả

in testing I often leave the directories of courses that I've been working with in ww-docker-data. They may even contain .pg test problems in the directory. I used to rebuild the docker container, then go to upgrade course to rebuild the database tables for these courses and then proceed from there.

Now I can't do that. If the course_user table is missing the course doesn't even appear in the list of candidates for upgrading the course. For most cases this is an advantage, but for the upgrade course page I suggest that we might prefer the old behavior and use
return grep { not (m/^\./ or m/^CVS$/) and -d "$coursesDir/$_" } readDirectory($coursesDir);
to list the courses available for potential upgrade. Comments?

@dlglin has already pointed out that some modifications to this upgrade script are needed so that no modifications are made until the ok is given.

Ngôn ngữ chính
Perl
Star
164
Fork
167
Merge trung bình
6 ngày 7 giờ
Pull request đã merge (30 ngày)
27

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

  • Có Dockerfile hoặc tệp Docker Compose
  • Không 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 openwebwork/webwork2

Tất cả issue của openwebwork/webwork2

Issue tương tự

Thêm issue về Perl

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.