Skip to content

Conversation

@drgrice1
Copy link
Member

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 for users that have the view_problem_debugging_info permission (which is those with the ta role or higher by default). So students will still see the usual faulty TeX code in yellow.

Another option would be to just remove the noerrors MathJax extension instead of optionally loading it. I am not sure why this package was added. It seems that I added it when I upgraded from MathJax version 2 to version 3, but I don't remember why. Perhaps it was just in the configuration that @dpvc recommended, or maybe I added it for some reason. Perhaps it was just about maintaining compatibility with version 2 of MathJax. For version 2 (as I understand it), the noerrors extension was included by default, but with MathJax version 3 it must be explicitly loaded.

Even if we decide to drop the noerrors extension, the change from the webwork_url to the webwork_js_config method in the WeBWorK::ContentGenerator module should be made anyway. There is also a webwork_url method in the Mojolicious::WeBWorK module 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 that WeBWorK::ContentGenerator method called the location helper which returns the empty string if the root URL is '/', and the webwork_url helper returns '/' in that case. I don't know what I was thinking creating the WeBWorK::ContentGenerator method which was really just an alies for the location helper method anyway.

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 for users
that have the `view_problem_debugging_info` permission (which is those
with the ta role or higher by default).  So students will still see the
usual faulty TeX code in yellow.

Another option would be to just remove the `noerrors` MathJax extension
instead of optionally loading it. I am not sure why this package was
added. It seems that I added it when I upgraded from MathJax version 2
to version 3, but I don't remember why.  Perhaps it was just in the
configuration that @dpvc recommended, or maybe I added it for some
reason.  Perhaps it was just about maintaining compatibility with
version 2 of MathJax.  For version 2 (as I understand it), the
`noerrors` extension was included by default, but with MathJax version 3
it must be explicitly loaded.

Even if we decide to drop the `noerrors` extension, the change from the
`webwork_url` to the `webwork_js_config` method in the
`WeBWorK::ContentGenerator` module should be made anyway.  There is also
a `webwork_url` method in the `Mojolicious::WeBWorK` module 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 that `WeBWorK::ContentGenerator` method called the
`location` helper which returns the empty string if the root URL is '/',
and the `webwork_url` helper returns '/' in that case. I don't know what
I was thinking creating the `WeBWorK::ContentGenerator` method which was
really just an alies for the `location` helper method anyway.
@drgrice1 drgrice1 force-pushed the mathjax-noerror-config branch from 449edae to 6ba7d26 Compare November 8, 2025 16:01
@drgrice1
Copy link
Member Author

Closing in favor of #2843.

@drgrice1 drgrice1 closed this Nov 11, 2025
@drgrice1 drgrice1 deleted the mathjax-noerror-config branch November 11, 2025 21:38
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