For Alex, I guess, since he wrote the problems ;-)
APEX has a lot of problems where there is a pop-up, or answer blank, followed by an "explain why" essay answer portion.
If there is just one part, this seems to be OK.
But there are several problems where students are asked about continuity at multiple points. For example, it might say:
(a) Is f(x) continuous at 0? (Pop-up: yes/no)
If not, explain why not. (Essay answer)
(b) Is f(x) continuous at 1? (Pop-up: yes/no)
If not, explain why not. (Essay answer)
The second pop-up is getting replaced by the first answer blank, and getting marked wrong as a result.
Here is an example of such a problem in PTX source (note that WW seems to not like the PiecewiseFunction context; I had to comment it out when testing the PG code):
<exercise label="ex-limit-continuity-point-1">
<webwork xml:id="webwork-ex-limit-continuity-point-1">
<pg-code>
Context("PiecewiseFunction");
@choices=('?',
'Yes.',
'No.'
);
@answer=(PopUp(~~@choices,1),PopUp(~~@choices,1));
$showwork = '[@ explanation_box(message => "If not, explain why not.") @]*';
</pg-code>
<introduction>
<p>
<m>f(x)=\begin{cases}1\amp x=0\\\frac{\sin(x)}{x}\amp x\neq0\end{cases}</m>
</p>
</introduction>
<task label="ex-limit-continuity-point-1a">
<statement>
<p>
Is <m>f</m> is continuous at <m>0</m>?
</p>
<p>
<var name="$answer[0]" form="popup"/>
</p>
<p>
<var name="$showwork" data="pgml"/>
</p>
</statement>
</task>
<task label="ex-limit-continuity-point-1b">
<statement>
<p>
Is <m>f</m> is continuous at <m>\pi</m>?
</p>
<p>
<var name="$answer[1]" form="popup"/>
</p>
<p>
<var name="$showwork" data="pgml"/>
</p>
</statement>
</task>
</webwork>
</exercise>
It produces the following PG code:
#############################################
### Generated from PreTeXt source
### on 2024-05-14T12:04:02-06:00
### A recent stable commit (2022-07-01):
### 6c761d3dba23af92cba35001c852aac04ae99a5f
###
###
https://pretextbook.org ###
#############################################
## DBsubject()
## DBchapter()
## DBsection()
## Level()
## KEYWORDS()
## TitleText1()
## EditionText1()
## AuthorText1()
## Section1(not reported)
## Problem1(1.5.19)
## Author()
## Institution()
## Language(en-US)
DOCUMENT();
############################################################
# Load Macros
############################################################
loadMacros(
"PGstandard.pl",
"PGML.pl",
"
scaffold.pl",
"AnswerFormatHelp.pl",
"PGessaymacros.pl",
"parserPopUp.pl",
"PGcourse.pl",
);
COMMENT('Authored in PreTeXt');
COMMENT('This problem is scaffolded with multiple parts');
############################################################
# Header
############################################################
TEXT(beginproblem());
############################################################
# PG Setup Code
############################################################
#Context("PiecewiseFunction");
@choices=('?',
'Yes.',
'No.'
);
@answer=(PopUp(~~@choices,1),PopUp(~~@choices,1));
$showwork = '[@ explanation_box(message => "If not, explain why not.") @]*';
############################################################
# Body
############################################################
BEGIN_PGML
Determine if [`f`] is continuous at the indicated values.
[`\newcommand{\amp}{&}f(x)=\begin{cases}1\amp x=0\\\frac{\sin(x)}{x}\amp x\neq0\end{cases}`]
END_PGML
############################################################
# Scaffold
############################################################
Scaffold::Begin(numbered => 1,is_open => "correct_or_first_incorrect",can_open => always,);
############################################################
# Section
############################################################
Section::Begin("");
BEGIN_PGML
Is [`f`] is continuous at [`0\text{?}`]
[_]{$answer[0]}{5}
[$showwork]**
END_PGML
Section::End();
############################################################
# Section
############################################################
Section::Begin("");
BEGIN_PGML
Is [`f`] is continuous at [`\pi\text{?}`]
[_]{$answer[1]}{5}
[$showwork]**
END_PGML
Section::End();
Scaffold::End();
############################################################
# End Problem
############################################################
ENDDOCUMENT();
In the PG editor on my WW server, I can answer "Yes" for part (a). If I answer "Yes" for part (b), I get the "this answer will be graded at a later time" message, and then an error that no answer blank is provided for AnSwEr003, which is the second pop-up.
When I first load the problem, I get the following warning messages:
Warning messages- Non fatal warnings. These are only displayed for users with permission to view problem debugging info.
- Use of uninitialized value in concatenation (.) or string at line 184 of [PG]/macros/core/PGessaymacros.pl
- from within main::explanation_box called at line 2 of (eval 4497)
- from within PGML::Eval called at line 902 of [PG]/macros/core/PGML.pl
- from within PGML::Parse::replaceCommand called at line 1339 of [PG]/macros/core/PGML.pl
- from within PGML::Format::Command called at line 1199 of [PG]/macros/core/PGML.pl
- from within PGML::Format::string called at line 1392 of [PG]/macros/core/PGML.pl
- from within PGML::Format::html::Indent called at line 1192 of [PG]/macros/core/PGML.pl
- from within PGML::Format::string called at line 1179 of [PG]/macros/core/PGML.pl
- from within PGML::Format::format called at line 1837 of [PG]/macros/core/PGML.pl
- from within PGML::Format called at line 1847 of [PG]/macros/core/PGML.pl
- from within PGML::Format2 called at line 79 of undefined
- Use of uninitialized value in concatenation (.) or string at line 184 of [PG]/macros/core/PGessaymacros.pl
- from within main::explanation_box called at line 2 of (eval 4507)
- from within PGML::Eval called at line 902 of [PG]/macros/core/PGML.pl
- from within PGML::Parse::replaceCommand called at line 1339 of [PG]/macros/core/PGML.pl
- from within PGML::Format::Command called at line 1199 of [PG]/macros/core/PGML.pl
- from within PGML::Format::string called at line 1392 of [PG]/macros/core/PGML.pl
- from within PGML::Format::html::Indent called at line 1192 of [PG]/macros/core/PGML.pl
- from within PGML::Format::string called at line 1179 of [PG]/macros/core/PGML.pl
- from within PGML::Format::format called at line 1837 of [PG]/macros/core/PGML.pl
- from within PGML::Format called at line 1847 of [PG]/macros/core/PGML.pl
- from within PGML::Format2 called at line 95 of undefined