From: Michael G. <ga...@ma...> - 2008-07-08 19:36:05
|
I think I've got it :-). Thanks. The PGauxiliaryfunctions.pl and PGcommonFunctions.pl define perl functions not MathObject functions. Instructors can use perl functions such as $a = C(15,3) but $A = Compute("C(15,3)"); will produce an error and students will not be able to use C(15,3) as part of their answer. This all seems like the correct behavior to me. (I believe this is a minor change from the behavior of fun_cmp before MathObjects since, to the best of my recollection, the perl parser for fun_cmp had access to any function defined in a main:: by PGauxiliaryfunctions.pl ) The current situation is preferable I just need to make sure I understand it well enough to document it accurately. For the next step: My first impression is that we can add the dozen or so remaining functions in PGauxiliaryfunctions.pl to PGcommonFunctions.pl and eliminate or redirect the first file completely. Another task will be to inventory the functions defined in PGauxiliaryfunctions.pl (and perhaps PGcommonFunctions.pl) and see which of them should be added either to the general context or added to specialized contexts so that the functions can also be used in MathObjects. Many of them have already been added. In both cases the goal would be to make it easy for a new author to determine (1) which "special" functions have already been defined somewhere in the PG files. (2) which contexts (specialized or general) are needed in order to allow use of these functions in MathObjects by instructors or students. Take care, Mike On Jul 8, 2008, at 2:41 PM, Davide P. Cervone wrote: >> It might be reasonable to add those functions later. It's also >> possible that there are few enough of these that >> they could be added to PGcommonfunctions.pl or PGauxiliaryfunctions. > > John has already mentioned this, but I want to be extra clear about > the point he made. The PGcommonfunctions.pl and > PGauxiliaryfunction.pl files defined commands available to the > problem AUTHOR. Note that C() and P() are already defined there. > The functions available to the students in their answers is > controlled by the Context(), and contextIntegerFunctions.pl makes C() > and P() available to students in their answers. That certainly should > not be the default, in my opinion. > > Davide > > ---------------------------------------------------------------------- > --- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > OpenWeBWorK-Devel mailing list > Ope...@li... > https://lists.sf.net/lists/listinfo/openwebwork-devel > |