ExpressionScript Engine roadmap: Difference between revisions
From LimeSurvey Manual
m (Text replacement - "ExpressionManager" to "ExpressionScript Engine") |
|||
(6 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
This page is for tracking the development status and TODO lists for | This page is for tracking the development status and TODO lists for ExpressionScript Engine | ||
__TOC__ | __TOC__ | ||
=Status= | =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= | =Wish List for EM-Related Enhancements= | ||
*[[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|Optimize LimeSurvey for Long Surveys and better performance and maintenance in general]] | *[[Project Ideas for GSoC 2012#Optimize LimeSurvey for Long Surveys|Optimize LimeSurvey for Long Surveys and better performance and maintenance in general]] | ||
=Performance Tuning Notes= | =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: | To accomplish this, two things are needed: | ||
#Ensure that all replacement values are correct when | #Ensure that all replacement values are correct when called. Some values like {QUESTION} change multiple times per page. Others are constant across all pages. | ||
#Find way to concatenate together all page components | #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?== | ==When are each of the following attributes changed?== | ||
Here are the possibilities: | Here are the possibilities: | ||
*global - means that the value is global for the LimeSurvey instance (across all surveys and sessions | *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 | *survey - means each survey might have a different value; | ||
*session - means the value should be static across a given session | *session - means the value should be static across a given session | ||
*page - means that the value on each page might differ | *page - means that the value on each page might differ | ||
Line 196: | Line 199: | ||
| | | | ||
|} | |} | ||
==Where within LimeSurvey is each Keyword Used?== | ==Where within LimeSurvey is each Keyword Used?== | ||
A green 1 means that the keyword is used in that file at least once. | A green 1 means that the keyword is used in that file at least once. |
Latest revision as of 15:50, 11 February 2020
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
- Enhance Expression Manager
- Optimize LimeSurvey for Long Surveys and better performance and maintenance in general
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:
- Ensure that all replacement values are correct when called. Some values like {QUESTION} change multiple times per page. Others are constant across all pages.
- 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.