Skip to content

Creation of a PG critic script. #1254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: PG-2.20
Choose a base branch
from

Conversation

pstaabp
Copy link
Member

@pstaabp pstaabp commented Jun 20, 2025

The pg-critic script analyzes a pgproblem (or list of them) for both good and bad features of a problem. Currently this include:

Positive features:

  • Uses PGML
  • Provides a solution
  • Provides a hint
  • Uses Scaffolds
  • Uses a custom checker
  • Uses a multianswer
  • Uses answer hints
  • Uses nicetables

Old and deprecated features

  • checking for deprecated macros
  • Use of BEGIN_TEXT/END_TEXT
  • Include the TEXT(beginproblem)
  • Include old tables (for example from unionTables.pl)
  • The use of num_cmp, str_cmp and fun_cmp in lieu of using MathObjects
  • Including Context()->TeXStrings
  • Calling loadMacros more than once.
  • Using the line $showPartialCorrectAnswers = 1 which is the default behavior and thus unnecessary.
  • Using methods from PGchoicemacros.pl
  • Including code or other text below the ENDDOCUMENT(); line indicating the end of the problem.

Currently the script can also score a problem (there is a rubric that is built-in to the script). This can be made more flexible.

Also, there are plans to include more features on both the positive and negative side.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set the executable bit on the pg-critic.pl script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants