I made some headway into effectively converting the sample essay problem to the behavior I originally expected, i.e., a summative assessment. The correct/incorrect indicator on the true/false toggle problem can be suppressed by triggering an action around the showAttemptResults flag. Below is some code to that effect.
However, students can still indirectly determine if they were successful by viewing the problem score both under the status column on the set page and the Grade page. If anyone has an idea of how to hide these values until after the due date on a homework assignment, this would be helpful. For our use case, there are advantages to mixing formative and summative assessment and it would be inconvenient for the students to take a webwork test to complete just one additional question.
DOCUMENT();
loadMacros(
'PGstandard.pl', 'PGML.pl',
'parserPopUp.pl', 'PGessaymacros.pl',
'PGcourse.pl'
);
$time=time();
$close=$rh_envir->{dueDate};
if($time < $close){ $rh_envir->{showAttemptResults}=0;}
$popup = PopUp(
[ 'Choose', 'True', 'False' ], # choices
'False' # corect answer
);
$a = random(2, 5);
$f1 = Compute("ln(x (x-$a))");
$f2 = Compute("ln(x) + ln(x-$a)");
BEGIN_PGML
Answer the following true / false question and then explain your answer. Your
answers will be read and graded manually at a later time.
[_]{$popup} For all real numbers [`x`], [`[$f1] = [$f2]`].
Please explain your reasoning in the answer box below.
[@ ANS( essay_cmp() ); essay_box(8, 60) @]*
END_PGML
ENDDOCUMENT();