From 08693d56ce8ccf096f3c9500687d6821c9bcc62a Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Fri, 10 Jul 2026 21:43:09 -0700 Subject: [PATCH] Save the useMathView user setting on the User Settings page 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. --- lib/WeBWorK/ContentGenerator/Options.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WeBWorK/ContentGenerator/Options.pm b/lib/WeBWorK/ContentGenerator/Options.pm index 9c669e581d..9c6bda537f 100644 --- a/lib/WeBWorK/ContentGenerator/Options.pm +++ b/lib/WeBWorK/ContentGenerator/Options.pm @@ -149,11 +149,14 @@ sub initialize ($c) { && $c->{effectiveUser}->showOldAnswers() ne $c->param('showOldAnswers')) || (defined($c->param('useMathQuill')) && $c->{effectiveUser}->useMathQuill() ne $c->param('useMathQuill')) + || (defined($c->param('useMathView')) + && $c->{effectiveUser}->useMathView() ne $c->param('useMathView')) ) { $c->{effectiveUser}->displayMode($c->param('displayMode')); $c->{effectiveUser}->showOldAnswers($c->param('showOldAnswers')); $c->{effectiveUser}->useMathQuill($c->param('useMathQuill')); + $c->{effectiveUser}->useMathView($c->param('useMathView')); eval { $db->putUser($c->{effectiveUser}) }; if ($@) {