Save the useMathView user setting on the User Settings page#3055
Open
xcompass wants to merge 1 commit into
Open
Save the useMathView user setting on the User Settings page#3055xcompass wants to merge 1 commit into
xcompass wants to merge 1 commit into
Conversation
The User Settings page shows a 'Use Equation Editor?' option when
$pg{specialPGEnvironmentVars}{entryAssist} is set to 'MathView', but
the useMathView parameter it submits was never read when saving, so the
selected value was silently discarded and the setting reverted to the
course default on every reload.
Include useMathView in the change detection and save it together with
the other display settings, matching how displayMode, showOldAnswers,
and useMathQuill are handled.
drgrice1
approved these changes
Jul 13, 2026
drgrice1
left a comment
Member
There was a problem hiding this comment.
The fact that none of us notices this shows how little MathView is used anymore. In fact, we will most likely be removing it soon. Unfortunately, it is vastly inferior to MathQuill. Also, I have been maintaining MathView, but that takes a lot of effort for this archaic approach to entry assistance.
Member
Author
|
Totally understand. Just happen to notice this when we are doing merge to our fork. |
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.
Summary
When
$pg{specialPGEnvironmentVars}{entryAssist}is set to'MathView', the User Settings page (templates/ContentGenerator/Options.html.ep) shows a "Use Equation Editor?" radio group nameduseMathView. However,WeBWorK::ContentGenerator::Options::initializenever reads that parameter when saving display settings — the change-detection condition only checksdisplayMode,showOldAnswers, anduseMathQuill, and the save block only writes those three fields. As a result the submitteduseMathViewvalue is silently discarded and the setting reverts to the course default ($pg{options}{useMathView}) on every page load.This adds
useMathViewto the change-detection condition and saves it on the effective user record alongside the other display settings, exactly matching the existing handling ofdisplayMode,showOldAnswers, anduseMathQuill.Testing
entryAssist => 'MathView'set inspecialPGEnvironmentVarsfor a course, toggle "Use Equation Editor?" on the User Settings page and save: theuser.useMathViewfield is updated and the selection persists after a reload (previously it always fell back to the course default).entryAssist => 'MathQuill') is unaffected: the added disjunct is guarded bydefined($c->param('useMathView'))and is inert when the MathView radios are not rendered, anduseMathView($c->param('useMathView'))then stores undef/NULL exactly as the existing code already does for the unrendereduseMathQuillparameter in the MathView flow.perltidy(Perl::Tidy 20260204, as pinned in.github/workflows/check-formats.yml) produces no changes on the modified file.