Warning with formula matrix when some entries are blank.

Đang mở
#1,134 2 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
15/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
perl
Lĩnh vực
backend

Hướng nghiên cứu

The warning comes from lib/Value/AnswerChecker.pm around line 1882, where a method call on an unblessed reference fails for a blank matrix entry. Start by reproducing the sample problem with a Formula matrix where one cell is left blank, then trace how AnswerChecker.pm handles the matrix answer on the second submit. Done means the warning no longer appears on repeated check or show-answer clicks, with blank entries in one or both cells.

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

Mô tả

MathObject issue

Here is a test problem.

DOCUMENT();
loadMacros(qw(PGstandard.pl PGML.pl));

Context('Matrix');
$M = Matrix([[Formula('x')], [Formula('y')]]);

BEGIN_PGML
[``[$M]=``] [_]*{$M}
END_PGML
ENDDOCUMENT();

If you enter in 'x' for the top row and keep the bottom row blank in the problem editor, and click on check answer or show correct answer twice in a row, a warning will appear.

Can't call method "type" on unblessed reference at [PG]/lib/Value/AnswerChecker.pm line 1882 

Unsure why two submits are needed and the warning won't appear after the first. Also if you make both answer boxes blank, you need to click two submits before the warning goes away.

Ngôn ngữ chính
Perl
Star
48
Fork
78
Merge trung bình
5 ngày 13 giờ
Pull request đã merge (30 ngày)
9

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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/pg

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

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.