When a set def file numbers a problem as 0
Les mainteneurs répondent en général sous 4 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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?
- Langage dominant
- Perl
- Étoiles
- 164
- Forks
- 167
- Merge moyen
- 6 j 7 h
- PR mergées (30 j)
- 27
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de openwebwork/webwork2
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
openwebwork/webwork2#3295 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
openwebwork/webwork2#3290 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
openwebwork/webwork2#2997 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 56/100
openwebwork/webwork2#3276 ·
Les mainteneurs répondent en général sous 4 jours
-
Difficulté 4/5 3-5 jours Accessibilité débutants 52/100
openwebwork/webwork2#3272 · 6 commentaires ·
Les mainteneurs répondent en général sous 4 jours
Toutes les issues de openwebwork/webwork2
Issues similaires
-
nftables: "Display comment in rules list?" option has no effect, comments not shown in rules listOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Type: Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
inverse-inc/packetfence#9707 ·
Les mainteneurs répondent en général sous 1 jour
-
Mailaddress phrase quotingOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
RotherOSS/otobo#6457 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
The reply-to for the pro user signup emails should be the email of the user instrad of the contact@ emailPeut-être pris @sisodiaumang l’a pris aujourd’hui. Ouverte🏭 producer platform - spam
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
openfoodfacts/openfoodfacts-server#15447 ·
Les mainteneurs répondent en général sous 1 jour
-
Harden argument handling in deploy-contract.shPeut-être pris @Asta-wizard l’a pris il y a 1 jour. OuverteStellar Wave
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Feyisara2108/stellargive#1377 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour