Skip to content

Commit

Permalink
Fix instructor feedback not being given when showPartialCorrectAnswer…
Browse files Browse the repository at this point in the history
…s is false.

This applies to problems rendered in the library browser or PG problem
editor.  In that case if $showPartialCorrectAnswers is false, then the
instructor is not given the problem status (correct/incorrect) in the
feedback.  This is because the renderProblem method does not set the
forceShowAttemptResults (which overrides the $showPartialCorrectAnswers
variable in PG) options.  So that is fixed by setting that option from
the submit buttons for instructors.
  • Loading branch information
drgrice1 committed Jan 24, 2024
1 parent ad2af5d commit b54fa5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/WebworkWebservice/RenderProblem.pm
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ async sub renderProblem {
showAttemptPreviews => $rh->{showAttemptPreviews}
// ($rh->{preview} || $rh->{WWsubmit} || $rh->{WWcorrectAns}),
showAttemptResults => $rh->{showAttemptResults} // ($rh->{WWsubmit} || $rh->{WWcorrectAns}),
forceShowAttemptResults => $rh->{forceShowAttemptResults},
forceShowAttemptResults => $rh->{forceShowAttemptResults} || ($rh->{isInstructor}
&& ($rh->{showAttemptResults} // ($rh->{WWsubmit} || $rh->{WWcorrectAns}))),
showMessages => $rh->{showMessages} // ($rh->{preview} || $rh->{WWsubmit} || $rh->{WWcorrectAns}),
showCorrectAnswers => $rh->{showCorrectAnswers} // $rh->{WWcorrectAns},
debuggingOptions => {
Expand Down

0 comments on commit b54fa5b

Please sign in to comment.