PG.pl uses the round function without explicitly loading a package that contains it.

Đang mở
#2,565 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 4 ngày

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

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
perl
Lĩnh vực
backend

Hướng nghiên cứu

Start with the minimal problem in the issue, which calls the round function from PG.pl line 1097 without loading PGauxiliaryFunctions.pl. Check where round is defined and how other macros expose helpers before choosing a fix, since the issue itself leaves open whether PG.pl should load that file. Done means the MWE shows feedback with no 'Undefined subroutine' warning, and maintainers have agreed on where the helper should live.

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

Mô tả

Here is a MWE:

DOCUMENT();

loadMacros(
    "PG.pl",
    "PGbasicmacros.pl",
    "PGML.pl",
);

$ans = List("1,2");

BEGIN_PGML
Enter [`1,2`]: [_]{$ans}
END_PGML
ENDDOCUMENT();

Enter "1" in the answer blank and you get the following warning message, and the feedback is not shown for the answer.

ERRORS from post processing PG text:
Undefined subroutine &main::round called at [PG]/macros/PG.pl line 1097

This is because the round function is defined in PGauxiliaryFunctions.pl, which is not loaded by this problem.

This could be solved by having PG.pl load PGauxiliaryFunctions.pl, but it seems wrong to have the core PG macro depend on other macro files.

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.