Remove images display mode and even the displayMode option generally - #3128
Merged
Alex-Jordan merged 2 commits intoAug 13, 2026
Merged
Conversation
This updates webwork2 for the corresponding change to PG. The `images` display mode has been removed, and so remove the option to select it and the `refreshMath2img` translation option that is no longer used. Perhaps the "List of display modes available to students" and "The default display mode" options should even be removed from the course configuration page. The only real option is now "MathJax", so why list these options? Furthermore, the `displayMode` URL parameter should probably be removed. Note that the `equation_display` route that no one knows about and that can only be accessed by entering the URL `https://yourserver.edu/webwork2/courseID/equation_display` in the browser has been removed since it depends on the `ImageGenerator` package which was removed on the PG side. All of the equation cache variables have been removed from the course environment, since those are no longer used. The `remove_stale_images` script is no longer needed, and was deleted. The non-native `depths` table that was only used for these images has been removed. Note that the `depths` table will need to be manually deleted from the database. Although it won't hurt if it is still there. It will quietly sit there unused if it is not deleted.
Note that this only removes the selection as pertains to HTML display mode choices in the user interface. Internally, there are still display mode decistions that are made to determine the type of problem render. There is one case where the display mode choice is left, and that is in the problem editor. That is because that is a different type of choice that is much the same as the internal decisions made elsewhere. In short the displayMode is now only used to determine if it is hardcopy, html, or PTX. In some cases plainText is used to save processing (such as in determining a new variant for a "Show Me Another" problem).
somiaj
approved these changes
Aug 13, 2026
somiaj
left a comment
Contributor
There was a problem hiding this comment.
Initial tests shows everything is working. I even tested leaving the displayMode settings in localOverrides, and it didn't affect the behavior.
Just out of curiosity what is Math_tth?
Contributor
|
Opps, I meant |
Member
Author
|
Do you mean |
Alex-Jordan
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is split into two commits.
The first just removes the
imagesdisplay mode, but generally leaves all behavior intact. This updates webwork2 for the corresponding change to PG. Theimagesdisplay mode has been removed, and so remove the option to select it and therefreshMath2imgtranslation option that is no longer used.Note that the
equation_displayroute that no one knows about and that can only be accessed by entering the URLhttps://yourserver.edu/webwork2/courseID/equation_displayin the browser has been removed since it depends on theImageGeneratorpackage which was removed on the PG side.All of the equation cache variables have been removed from the course environment, since those are no longer used. The
remove_stale_imagesscript is no longer needed, and was deleted.The non-native
depthstable that was only used for these images has been removed. Note that thedepthstable will need to be manually deleted from the database. Although it won't hurt if it is still there. It will quietly sit there unused if it is not deleted.The second commit takes things further. I realized that once the
imagesdisplay mode is removed, there really is no point in a user interface choice of display modes. There is no real reason to actually enable theplainTextdisplay mode which has always been disabled by default, and so there is no real choice for the user anymore. So it removes thedisplayModeand related options. Note that this only removes the selection as pertains to HTML display mode choices in the user interface. Internally, there are still display mode decistions that are made to determine the type of problem render.There is one case where the display mode choice is left, and that is in the problem editor. That is because that is a different type of choice that is much the same as the internal decisions made elsewhere.
In short the displayMode is now only used to determine if it is hardcopy, html, or PTX. In some cases plainText is used to save processing (such as in determining a new variant for a "Show Me Another" problem).