WeBWorK Problems

DraggableProof example has a warning message upon execution.

DraggableProof example has a warning message upon execution.

by tim Payer -
Number of replies: 3
Greetings all,

I am trying to create a draggableProof problem and I am only in the beginning stages. I thought I would start with the wiki example provided on the MAA site:

http://webwork.maa.org/wiki/DraggableProofs#.WarkrvnfqUl

But running this example has the following error statement:

PG warning messages

---- main (eval 4440) 464 ------
Error in NAMED_ANSWER_RULE_EXTENSION: every call to this subroutine needs to have $options{answer_group_name} defined. Answer blank name: AnSwEr0001-src

While the example problem does execute and will flag incorrect and correct responses accordingly, there is a disconcerting duplication of phrase statements for each selection made.

Could you please let me know what I am missing before I try to edit this example problem any further?

Also I am assuming that because of the format of these drag and drop statements that there is no comparable PGML equivalent for draggable statements?

Thanks for any help, Tim

# DESCRIPTION Draggable Proof Experimentation
# WeBWorK problem written by TimPayer <tsp1@humboldt.edu>
# ENDDESCRIPTION

## DBsubject(Probability)
## DBchapter(Random variables)
## DBsection(Expectation)
## Institution(Humboldt State University)
## Author(Tim Payer)
## KEYWORDS(probability, translate, notation)
DOCUMENT();
loadMacros(
"PGstandard.pl",
"MathObjects.pl",
"parserPopUp.pl",
"PGML.pl",
"unionTables.pl",
"niceTables.pl",
"PGcourse.pl",
"draggableProof.pl",
);

# install_weighted_grader();
# "weightedGrader.pl"
TEXT(beginproblem());
$CorrectProof = DraggableProof([
"Jason Aubrey",
"Someone better than Jason but less than everyone else",
"John Travis"
],

[
"Don't complain about it",
"\(x^2\)",
"a third chance for an error"
],

SourceLabel => "Choose from these",
TargetLabel => "Place the people in order of increasing usefulness.",
);

Context()->texStrings;

#######################################
#### Begin Problem...


BEGIN_TEXT

Select \{ $CorrectProof->numNeeded \} of the following.

$PAR
\{ $CorrectProof->Print \}

END_TEXT
Context()->normalStrings;

# Answer Evaluation

ANS($CorrectProof->cmp);


ENDDOCUMENT();
In reply to tim Payer

Re: DraggableProof example has a warning message upon execution.

by Michael Gage -
Hi Tim,

There was a bug that was corrected with this pull request to the OPL:


You can either update the OPL or you can grab the
file


You'll want to make sure that the problem is actually using the version of draggableProof in the macros/MC directory and not some previous local copy in myCourse/templates/macros.




In reply to Michael Gage

Re: DraggableProof example has a warning message upon execution.

by Michael Gage -
Thank you for the guidance, but we have only had partial success:
Keep in mind we are using an MAA Subscription version 2.13

1.) After loading the copy of the macro of draggableProof.pl into our macro folder in the template directory this DID eliminate the error statements. And the problem does flag correct and incorrect answers as it should.

2.) however, there is still a doubling of correct statements:


-- Tim
In reply to Michael Gage

Re: DraggableProof example has a warning message upon execution.

by Michael Gage -
I'll update the version of 2.13 on the maa server now.

The doubling of correct statements might be a bug in draggableProof.pl. I've noticed that it doesn't work well when you use randomizeProblem to give a new version (the items in the right column don't get erased). You may be seeing a different version of the same phenomenon. I suspect this doesn't happen with a freshly assigned problem.

If you can collect data on what makes this doubling occur it will help with the fix -- but I can't guarantee when the fix will occur.