WeBWorK Problems

Errror with AnswerFormatHelp.pl

Errror with AnswerFormatHelp.pl

by James Morski -
Number of replies: 3
We created a new course to author some problems and have had issues with the AnswerFormatHelp.pl macro. It seems like WW cannot locate the macro.

My understanding is the WW is looking in each of the places listed in the path in successive order and since the macro is not found, the error is generated. It's not clear to me, though, why this has all of a sudden happened for this particular course, as we have created some new courses over the last few weeks and have not had this issue.

Thanks!


Here is code and the error message:

## DESCRIPTION
## Calculus Two, Introductory Differential Equations
## ENDDESCRIPTION


## DBsubject(Calculus)
## DBchapter()
## DBsection()
## Date(09/09/2018)
## Institution(Community College of Denver, Colorado Community College System)
## Author(Brittni Lorton)
## KEYWORDS('calculus', 'differential equations', 'identify linear')



###########################
# Initialization

DOCUMENT();

loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"AnswerFormatHelp.pl",
"PGML.pl",
"PGcourse.pl",
"parserPopUp.pl",
);
Context()->variables->add(y => "Real");
Context()->variables->add(t => "Real");
Context()->variables->add(dy => "Real");
Context()->variables->add(dt => "Real");

TEXT(beginproblem());
$showPartialCorrectAnswers = 1;

###########################
# Setup


$a = non_zero_random(-10,10,1);
$b = non_zero_random(-10,10,1);
$c=non_zero_random(1,3,1);


if ($c=1) {
$popup = PopUp(
["?","linear","nonlinear"],
"linear",
);
}
else {
$popup = PopUp(
["?","linear","nonlinear"],
"nonlinear",
);
}

$ldiffeq=Formula("(dy)/(dt) +$a*y^($c)")->reduce;
$rdiffeq=Formula("$b*t")->reduce;


###########################
# Main text

BEGIN_PGML

Is the following differential equation linear or nonlinear?

[`[$ldiffeq] = [$rdiffeq]`]

[____]{$popup}


END_PGML


############################
# Solution

#BEGIN_PGML_SOLUTION
#Solution explanation goes here.
#END_PGML_SOLUTION

COMMENT('MathObject version. Uses PGML.');

ENDDOCUMENT();



WeBWorK Warnings

WeBWorK has encountered warnings while processing your request. If this occured when viewing a problem, it was likely caused by an error or ambiguity in that problem. Otherwise, it may indicate a problem with the WeBWorK system itself. If you are a student, report these warnings to your professor to have them corrected. If you are a professor, please consult the warning output below for more information.

Warning messages

  • Can't locate macro file |AnswerFormatHelp.pl| via path: |.|,
    |[TMPL]/macros|,
    |[PG]/macros/|,
    |[TMPL]/Library/macros/Union|,
    |[TMPL]/Library/macros/Michigan|,
    |[TMPL]/Library/macros/CollegeOfIdaho|,
    |[TMPL]/Library/macros/FortLewis|,
    |[TMPL]/Library/macros/TCNJ|,
    |[TMPL]/Library/macros/NAU|,
    |[TMPL]/Library/macros/Dartmouth|,
    |[TMPL]/Library/macros/WHFreeman|,
    |[TMPL]/Library/macros/UMass-Amherst|,
    |[TMPL]/Library/macros/PCC|,
    |[TMPL]/Library/macros/Alfred|,
    |[TMPL]/Library/macros/Wiley|,
    |[TMPL]/Library/macros/UBC|,
    |[TMPL]/Library/macros/Hope|

Request information

Time Mon Sep 10 14:40:18 2018
Method GET
URI /webwork2/MAT202_For_Coders_FA18/Section_04.5/2/
In reply to James Morski

Re: Errror with AnswerFormatHelp.pl

by Danny Glin -
Has the Library link been created in this course?

Depending on how your modelCourse is set up, the link to the OPL may not be created until the first time you click on the Library Browser.

Try clicking on Library Browser then viewing the problem again.
In reply to Danny Glin

Re: Errror with AnswerFormatHelp.pl

by James Morski -
That's it! What a strange fix, but glad this is now working. Thank you!
In reply to James Morski

Re: Errror with AnswerFormatHelp.pl

by Alex Jordan -
AnswerFormatHelp.pl does not live in pg/macros. It is a contribution to the OPL from Fort Lewis. So that is why the bridge to the OPL must be working in order to access it.