Make MathJax show errors for bad TeX but only in the problem editor. (another alternate for #2837 and #2838) #2843
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.
There have been requests to either remove this extension or at least make it so that those editing problems do not have it loaded, as it makes it easier to determine what is wrong with TeX in a problem.
This pull request makes it so that these errors are only shown in the PG problem editor. Actually they are shown any time the renderRPC endpoint is used and the
showMathJaxErrorsparameter is set to a true value, but the only time that webwork2 now does this is in the problem editor.Of #2837, #2838, and this pull request, I think this is the way to go.
This still includes thhe change from the
webwork_urlto thewebwork_js_configmethod in theWeBWorK::ContentGeneratormodule. There is also awebwork_urlmethod in theMojolicious::WeBWorKmodule that is already available for all controller modules (since it is a Mojolicious helper method), and having this other one overrides that one and it is confusing to have both that return almost the same value. The only difference is thatWeBWorK::ContentGeneratormethod called thelocationhelper which returns the empty string if the root URL is '/', and thewebwork_urlhelper returns '/' in that case. I don't know what I was thinking creating theWeBWorK::ContentGeneratormethod which was really just an alies for thelocationhelper method anyway.