When a set def file numbers a problem as 0
メンテナーはふだん 4 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
The problem-id check that accepts a leading 0 is in DB.pm around lines 2414-2419, as the issue describes. Read that block and the error message beside it, then confirm how a set def file with problem id 0 gets through. Done means the regex rejects a leading 0 and the message names the bad id, and the maintainers have agreed whether the whole import should halt. The discussion is unresolved and the issue has been idle for about three years, so ask on the issue before writing code.
索引モデルが issue の本文から書いたものです。
説明
This is discussed at https://github.com/openwebwork/webwork2/pull/2194#issuecomment-1811919002, but I'm moving it to an issue. The issue is about what can happen if a set def file uses 0 as a problem id.
Some discussion on that thread is about how to salvage the situation and what new number to use for the problem numbered 0. But I suggest that if the set def file has a bad problem id anywhere, the whole thing should halt and no problem set should be created. With an informative error message about what is wrong with the set def file.
The cases of a set definition containing any invalid problem id comes from someone editing a set definition file by hand.
Possibly from other places too though. PreTeXt automatically creates set def files for all the WW exercises from a section of a book. I don't think it can create invalid problem numbers, but my point is that some automatic creation of set def files can come from external sources. PTX is one example (possibly the only one but who knows).
My suggestion would be to just edit lines 2414-2419 of DB.pm. The regex pattern could change to disallow a leading 0. And the message could be rephrased. If there is an existing set def file out in the world that uses 0 for a problem, it will now fail to import but....good?
- 主要言語
- Perl
- スター
- 164
- フォーク
- 167
- 平均マージ
- 6日 7時間
- マージ済み PR(30日)
- 27
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openwebwork/webwork2 のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
openwebwork/webwork2#3295 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
openwebwork/webwork2#3290 ·
メンテナーはふだん 4 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
openwebwork/webwork2#2997 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 56/100
openwebwork/webwork2#3276 ·
メンテナーはふだん 4 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
openwebwork/webwork2#3272 · コメント 6 件 ·
メンテナーはふだん 4 日以内に返信
openwebwork/webwork2 の issue をすべて見る
似ている issue
-
nftables: "Display comment in rules list?" option has no effect, comments not shown in rules listオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Type: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
inverse-inc/packetfence#9707 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
RotherOSS/otobo#6457 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
The reply-to for the pro user signup emails should be the email of the user instrad of the contact@ email対応中かも @sisodiaumang が今日担当しました。 オープン🏭 producer platform - spam
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
openfoodfacts/openfoodfacts-server#15447 ·
メンテナーはふだん 1 日以内に返信
-
Harden argument handling in deploy-contract.sh対応中かも @Asta-wizard が 1 日前に担当しました。 オープンStellar Wave
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Feyisara2108/stellargive#1377 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信