From 126af5f82ebfb1eefc57de7a18b1a9fa7c458442 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sun, 17 Dec 2023 16:11:23 -0600 Subject: [PATCH] Make correct answers available for instructors always if feedback is shown. --- lib/WeBWorK/ContentGenerator/GatewayQuiz.pm | 2 +- lib/WeBWorK/ContentGenerator/Problem.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm index 687d806a5b..27f5e47bba 100644 --- a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm +++ b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm @@ -1486,7 +1486,7 @@ async sub getProblemHTML ($c, $effectiveUser, $set, $formFields, $mergedProblem) $c->{will}{showProblemGrader} ? 2 : !$c->{previewAnswers} && $c->can_showCorrectAnswersForAll($set, $c->{problem}, $c->{tmplSet}) ? ($c->ce->{pg}{options}{correctRevealBtnAlways} ? 1 : 2) - : ($c->{submitAnswers} || $c->{will}{checkAnswers}) && $c->{will}{showCorrectAnswers} ? 1 + : !$c->{previewAnswers} && $c->{will}{showCorrectAnswers} ? 1 : 0 ), debuggingOptions => getTranslatorDebuggingOptions($c->authz, $c->{userID}) diff --git a/lib/WeBWorK/ContentGenerator/Problem.pm b/lib/WeBWorK/ContentGenerator/Problem.pm index b7e629673c..a5d69b6b9c 100644 --- a/lib/WeBWorK/ContentGenerator/Problem.pm +++ b/lib/WeBWorK/ContentGenerator/Problem.pm @@ -600,7 +600,7 @@ async sub pre_header_initialize ($c) { $will{showProblemGrader} || ($c->{submitAnswers} && $c->{showCorrectOnRandomize}) ? 2 : !$c->{previewAnswers} && after($c->{set}->answer_date, $c->submitTime) ? ($ce->{pg}{options}{correctRevealBtnAlways} ? 1 : 2) - : (($c->{submitAnswers} || $will{checkAnswers}) && $will{showCorrectAnswers}) ? 1 + : !$c->{previewAnswers} && $will{showCorrectAnswers} ? 1 : 0 ), debuggingOptions => getTranslatorDebuggingOptions($authz, $userID)