Actions

ExpressionScript Engine roadmap: Difference between revisions

From LimeSurvey Manual

No edit summary
No edit summary
Line 13: Line 13:


=Wish List for EM-Related Enhancements=
=Wish List for EM-Related Enhancements=
==Near Term (relatively easy)==
#Add support for "this"
##Already lets you access this, this.NAOK, this.shown, etc. and show as valid within relevance equations
##Should provide access to all array values too - so create several:  this, this_nc (no comments), this_oc  (only comments)
##Should be expanded by EM during JavaScript generation to be comma separated values
##So, if you want to sum all values for an array, you'd say sum(this.NAOK) (or count(this.NAOK) to count number of answers)
##Macro expansion should occur in group.php as  cycles through each question
##Value should be forcibly cleared at start of each group/page otherwise use of this in a group description would have unpredictable results
#Add aliases for common array processing values
##qcode_vars - acts like this, so can do sum(qcode_vars.NAOK), count(qcode_vars.NAOK), implode(', ', qcode_vars.shown), stddev(qcode_vars.NAOK), etc.
##qcode_vars_nc (no comments), qcode_vars_oc (only comments)
#Add aliases needed to do row and column sums within arrays yet still properly handle array_filter
##qcode_rowname_vars
##qcode_colname_vars
#Enhance EM'support for array_filter
##If the filter is completely dependent upon questions on prior pages, then irrelevant filtered values don't need to be generated in the HTML
##Currently, all array_filter items are generated, but appropriately hidden.  For large arrays, this can lead to a lot of never-to-be-used code
==Longer Term (harder)==
*[[Project Ideas for GSoC 2012|#Enhance Expression Manager|Enhance Expression Manager]]
*[[Project Ideas for GSoC 2012|#Enhance Expression Manager|Enhance Expression Manager]]
*[[Project Ideas for GSoC 2012|#Optimize LimeSurvey for Long Surveys and better performance and maintenance in general|Optimize LimeSurvey for Long Surveys and better performance and maintenance in general]]
*[[Project Ideas for GSoC 2012|#Optimize LimeSurvey for Long Surveys and better performance and maintenance in general|Optimize LimeSurvey for Long Surveys and better performance and maintenance in general]]

Revision as of 08:10, 30 June 2012

This page is for tracking the development status and TODO lists for ExpressionManager

Status

1.92+ stable was released in March, 2012.

Upgrade Notes

There are a few backwards incompatibilities between 1.92 and 1.91.  Please read them carefully.

Wish List for EM-Related Enhancements

Performance Tuning Notes

ExpressionManager can be called dozens to hundreds of times per page.  Instead, it should be possible to concatenate together the roughly tailored parts of the survey page and call Expression Manager once per page (or at least fewer times).

To accomplish this, two things are needed:

  1. Ensure that all replacement values are correct when  called.  Some values like {QUESTION} change multiple times per page.  Others are constant across all pages.
  2. Find way to concatenate together all page components priort to calling ExpressionManager.

For values that change multiple times per page (like {QUESTION}), I'd like to replace calls to templatereplace(), replaceTokens(), insertAnsReplace(), dTexts, and replaceFields() (several of which call ExpressionManager) as follows:

  • Templates: (except for Group and Question) - return as is so they get processed at the end
  • Group Template:  Replace {GROUP} with something like {GROUP_N} which ExpressionManager would then substitute at the end
  • Question Template:  Replace {QUESTION}  and {ANSWER} with something like {QUESTION_N} and {ANSWER_N} which would also get replaced after the whole page was composed.

When are each of the following attributes changed?

Here are the possibilities:

  • global - means that the value is global for the LimeSurvey instance (across all surveys and sessions
  • survey - means each survey might have a different value
  • session - means the value should be static across a given session
  • page - means that the value on each page might differ
  • group - means might differ for each group
  • questions - means might differ for each question
  • answer - means  might differ for each answer option
  • no processing needed - means EM should only do a plain replace on these, no processing of the contents
Attribute When Changed
AID answer
ANSWER answer
ANSWERSCLEARED survey
ASSESSMENTS page
ASSESSMENT_CURRENT_TOTAL page
ASSESSMENT_HEADING survey
CHECKJAVASCRIPT survey - no processing needed
CLEARALL survey
CLOSEWINDOW survey
COMPLETED session
DATESTAMP page - no processing needed
EXPIRY survey - no processing needed
GID group
GROUPDESCRIPTION group
GROUPNAME group
LANG page
LANGUAGECHANGER page
LOADERROR survey
LOADFORM survey
LOADHEADING survey
LOADMESSAGE survey
NAVIGATOR page
NOSURVEYID survey - no processing needed
NUMBEROFQUESTIONS survey
PERCENTCOMPLETE page
PRIVACY survey
PRIVACYMESSAGE survey
QID question
QUESTION question
QUESTIONHELP question
QUESTIONHELPPLAINTEXT question
QUESTION_CLASS question
QUESTION_CODE question
QUESTION_ESSENTIALS question
QUESTION_FILE_VALID_MESSAGE question
QUESTION_HELP question
QUESTION_INPUT_ERROR_CLASS question
QUESTION_MANDATORY question
QUESTION_MAN_CLASS question
QUESTION_MAN_MESSAGE question
QUESTION_NUMBER question
QUESTION_TEXT question
QUESTION_VALID_MESSAGE question
REGISTERERROR survey
REGISTERFORM survey
REGISTERMESSAGE1 survey
REGISTERMESSAGE2 survey
RESTART survey
RETURNTOSURVEY survey
SAVE survey
SAVEALERT survey
SAVEDID survey
SAVEERROR survey
SAVEFORM survey
SAVEHEADING survey
SAVEMESSAGE survey
SGQ question
SID survey
SITENAME global
SUBMITBUTTON survey
SUBMITCOMPLETE survey
SUBMITREVIEW survey
SURVEYCONTACT survey
SURVEYDESCRIPTION survey
SURVEYFORMAT survey
SURVEYLANGAGE survey
SURVEYLIST survey
SURVEYLISTHEADING survey
SURVEYNAME survey
TEMPLATECSS survey
TEMPLATEURL survey
THEREAREXQUESTIONS suvey
TOKEN session - no processing needed
URL survey
WELCOME survey

Where within LimeSurvey is each Keyword Used?

A green 1 means that the keyword is used in that file at least once.