Actions

ExpressionScript Engine roadmap

From LimeSurvey Manual

Revision as of 14:50, 11 February 2020 by C schmitz (talk | contribs) (Text replacement - "ExpressionManager" to "ExpressionScript Engine")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page is for tracking the development status and TODO lists for ExpressionScript Engine


Status

EM was introduced in version 1.92+ (released in March 2012). Since then it is a part of every LimeSurvey distribution.


Wish List for EM-Related Enhancements


Performance Tuning Notes

ExpressionScript Engine 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 a way to concatenate together all page components prior to calling ExpressionScript Engine.

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 ExpressionScript Engine) as follows:

  • Templates: (except for Group and Question) - return as they are so they get processed at the end;
  • Group Template: Replace {GROUP} with something like {GROUP_N} which ExpressionScript Engine 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.