PREP 2014 Question Authoring - Archived

force anser to be number

Re: force anser to be number

by Joel Trussell -
Number of replies: 0
Are you using the newest version of contextComplexJ.pl from the develop branch, or the older one in the master branch?

How do I know? or better how do I find out? 

I copied the revised problem to a new problem, but the error message
Warning -- there may be something wrong with this question. Please inform your instructor including the warning messages below.

Warning messages

  • Constant 'j' already exists at [PG]/lib/Value/Context/Data.pm line 89
  • Constant 'j' already exists at [PG]/lib/Value/Context/Data.pm line 89
 
This may be related to your question on versions. 

We're trying to develop our Webwork problems here for use in engineering. I'm having difficulty keeping my various versions and patches consistent. For example, learning to use 
  ($complexJ) ? "contextComplexJ.pl"  : "",
then inserting the load macro in PGcourse.pl, etc. 

Given that we want the text and the students to use j but it is OK for them to use i for sqrt(-1), what is the proper macro load. 

lastly, I understand I can change contexts in the middle of a problem. I don't understand the double call

Context("LimitedComplex-cartesian");
context::ComplexJ->Enable();
This would appear to disallow the form rho *exp(j*theta) which is fine for this problem
the second line does what? I thought complexJ was a context and this looks like setting two contexts at one time. 
Thanks