Skip to content

Commit eef558b

Browse files
authored
Merge pull request #1442 from drgrice1/sample-problem-typo
Fix a typo in the AdaptiveParameters sample problem.
2 parents b61ece0 + c5c6a67 commit eef558b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tutorial/sample-problems/ProblemTechniques/AdaptiveParameters.pg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
4343
#: If the answers may be a pure multiple of the correct answer without an
4444
#: additive constant, then `0` should not be considered correct. For example,
4545
#: if the general solution were `ce^x`. So the commented out line
46-
#: `return 0 if $student == Formula(0);` would needed in that case.
46+
#: `return 0 if Formula(0) == $student;` would needed in that case.
4747
#:
4848
#: Observe that this checker bypasses the adaptive parameter code for the
4949
#: 'produce_equivalence_message' filter. This filter compares the current
@@ -54,8 +54,8 @@ loadMacros('PGstandard.pl', 'PGML.pl', 'PGcourse.pl');
5454
$aSoln = Compute('e^x - 1')->cmp(
5555
checker => sub {
5656
my ($correct, $student, $ans) = @_;
57-
# return 0 if $student == Formula(0); # See comments.
58-
if ($self->{_filter_name} ne 'produce_equivalence_message') {
57+
# return 0 if Formula(0) == $student; # See comments.
58+
if ($ans->{_filter_name} ne 'produce_equivalence_message') {
5959
my $context = Context()->copy;
6060
$context->flags->set(no_parameters => 0);
6161
$context->variables->add(C0 => 'Parameter');

0 commit comments

Comments
 (0)