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

オープン
#2,565 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
perl
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Perl
スター
164
フォーク
167
平均マージ
6日 7時間
マージ済み PR(30日)
27

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

openwebwork/webwork2 のほかの issue

openwebwork/webwork2 の issue をすべて見る

似ている issue

Perl の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。