-
-
Notifications
You must be signed in to change notification settings - Fork 165
Show Deprecated macros warning in PG editor and library Browser #2752
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
base: develop
Are you sure you want to change the base?
Conversation
a798dbe
to
6646035
Compare
Updated to use the |
@pstaabp: I added a pull request to this branch that fixes some things. First, it only processes the |
Merged @drgrice1 's PR as noted above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
One very minor thing, it seems that when chain loading macros, the chain loaded macros are listed before the originally loaded macro. For instance loadMacros('littleneck.pl')
gives the following list of deprecated macros:
- problemRandomize.pl
- littleneck.pl
So even though the only macro loaded was littleneck.pl
, a macro that was never loaded got listed first. I can't think of a way to fix this, just something I noticed.
@somiaj: The order that the macros are displayed does not depend on if one macro loads the other at all. It also doesn't depend on the order that the macros are loaded at all either. The macros are stored in the |
Ahh, makes sense, it skipped my mind it was originally stored as a hash, which won't have order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good at this point.
Although, if we merge this, then there are now going to be warnings in the library browser, on the set details page, on the statistics page, on the problem grader page, and in the PG problem editor. So these message will be quite prevalent for instructors, and there are thousands of problems in the OPL that will give these warnings. Notably, many problems use the AnswerFormatHelp.pl
macro. So we need to start working on those problems. Particularly replacing AnswerFormatHelp.pl
usage with helpLink
usage.
Peter submitted openwebwork/webwork-open-problem-library#1279 to replace I think it's at least as likely that instructors see these warnings that the problems should not be used, and conclude that WeBWorK can't provide them with enough working problems. |
I agree that we may not be ready for this yet. I think that work on OPL problems to fix deprecated macro usage should come first. |
I can update this to go to develop if desired to wait a year. |
7df0708
to
3eb23a6
Compare
Note: switched the destination branch to develop. |
This adds a warning next to the problem comment on the PGProblemEditor, Library Browser (and maybe other places that use the Library Browser render) right before any instructor problem if deprecated macros are used in the problem.
Only parse the macro file list if the PGcore object is in the result. Also, remove the `p` tags and tweak the style of the html generated to display the deprecated macros list to get consistent spacing.
3eb23a6
to
5351653
Compare
This uses code from @somiaj to take the list of deprecated macros in the PG object and display only for instructors in the PGeditor and library browser.
Note: this needs openwebwork/pg#1256.