Hi,

Le 27/05/2011 05:17, Thomas White, MD, MS, MA a écrit :
Hi-

I'm working on issue http://bugs.limesurvey.org/view.php?id=5103 , and would value feedback on some of the choices.

I initially created two substitution patterns:
(1) {ANS: ... } - this is the equivalent of {INSERTANS: ...}, but uses question.title as the name instead of the SGQA name
(2) {EVAL: ... } - this is a placeholder for evaluating the ... section using an  equation parser where the variable names will be using the question.title name.

I got these working by creating .\classes\dTexts\dFunctions\dFunctionAns.php and .\classes\dTexts\dFunctions\dFunctionEval.php.

However, I see that common_functions.php has function insertansReplace($line), plus templatereplace($line) for the bulk of the token replacements.

What is the preferred place to put these new replacement functions?

Good question,
this dTexts class was added by a contributor but I don't think the migration to using the new code was completed. So I would go for dTexts as it should be the reference implementation in the future though I have never had a look to it yet ;-)

Thibault


/Tom (TMSWhite)
------------------------------------------------------------------------------ vRanger cuts backup time in half-while increasing security. With the market-leading solution for virtual backup and recovery, you get blazing-fast, flexible, and affordable data protection. Download your free trial now. http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________ limesurvey-developers mailing list limesurvey-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/limesurvey-developers