New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev All 3 survey styles (question, group, all-in-one) working via "group.php", which should now be called something like navigation_controller.php
Dev So, all decisions about what to display and how to validate them are centrally coordinated
Dev Removed obsolete code
Dev Note - there is still some lingering duplicate processing - especially in qanda.php. No additional SQL queries should be needed to display questions/answers - can get them from EM cache - will require refactoring of qanda.php

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11600 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev Added Cross-site scripting protection to EM - substitutions are htmlspecialchars() escaped prior to insertion into HTML

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11602 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev Removed more obsolete code
Dev FixLanguageConsistency() upgraded to save relevance for questions and groups  across languages

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11603 b72ed6b6-b9f8-46b5-92b4-906544132732
Merged all changes in 1.91+ branch from revision 11331 to 11606 (HEAD) into limesurvey_dev_tms branch

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11607 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
BugFix of All-in-one navigation (was not re-displaying page when there are violations of mandatory or validation rules)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11608 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05288: Optionally replace Assessments with ExpressionManager features
Dev EM is now able to use answer.assessment_value values when they are available
Dev added two new variable dot notation suffixes to access those properties:  .value, and .valueNAOK.  These supplement .code and .NAOK which return the code value
Dev this works Server and Client-side, so can use assessment values to compute same-page assessment scores and reports.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11615 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev renamed some variables for consistency across EM-related code

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11616 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev renamed some more variables for consistency across EM-related code

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11617 b72ed6b6-b9f8-46b5-92b4-906544132732
Fixed bug: Survey name not showing in some instances
Fixed bug: Not all conditions were displaying at beginning of question
Fixed bug: Values of responses in conditions explanation showing where not applicable, now only displays with N or K type questions
Fixed bug: When values of responses showing, poorly formatted (no spaces)
Fixed bug: Value of condition upon which numerical question based not showing
New feature: classes added around language seperators (and) or (or) allowing users to force newlines etc. using CSS to format conditions displays better ('scenario-or-seperator', 'scenario-at-seperator', 'scenario-and-seperator')
New Feature: Explanation now also displays "maximum or minimum answers required" from advanced settings
New Feature: Prefixes and Suffixes for single text/numerical question advanced settings are now displayed (requires CSS update to display nicely)


git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11618 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05104: Create new question type for stored calculation results, called Equation
Dev Upon activate survey, database table uses text instead of varchar(5) to store equation result

New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev Fixed EM caching - now shows accurate syntax highlighting throughout admin screens (e.g. refreshes itself whenever questions/conditions/groups are added/updated/deleted, or when swtich surveys)
Dev Made error logging to DB optional (default false)
Dev Fixed question and group copy to also copy relevance and assessment_value values
Dev Gracefully handle groups with no questions in both preview and run-time modes
Dev Allow import of groups with no questions
Dev Fixed printanswers() so shows fully tailored responses (e.g. exactly what the subject saw)
Dev Removed obsolete unit tests (e.g. those that directly modify the database)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11619 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev Got default values working, including auto-resetting of them if a question becomes irrelevant and relevant again (across pages)
Dev Put question.help into fieldmap to avoid having to query for help text for each question in qanda

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11621 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev Navigation Index now properly honors mandatory and validation rules - if try to jump forward and there are intervening mandatory or invalid questions, you will be presented with that page instead.  
Dev Submit from Navigation Index now properly handles mandatory and validation rules - can't submit until all relevant mandatory and validation rules pass
Dev This makes it safe to let users jump back and change something, then click back to furthest question asked.  
Dev Users may not be aware of  value changes in between, but if there are any newly unanswered questions, the Navigation Index will display them with red color coding to indicate they have not been answered.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11622 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature #05269: Use ExpressionManager for Branching logic as optional alternative to Conditions
Dev "Resume Later", "Load unfinished survey", and restore from email link are all now working correctly.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11624 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature Generate EM-Syntax-Highlighted Logic File for Surveys
Dev Now shows Groups/Questions and their relevance and tailored text.
Dev Click on hyper-links or syntax-highlighted EM-equation variables to open new tab to edit that question/group
Dev Plan to also show sub-questions, answers,  validation equations, and summary of errors (so can use this file to do review during development and/or prior to activation)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11625 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature Generate EM-Syntax-Highlighted Logic File for Surveys
Dev Now shows pretty printed validation equations and tips

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11626 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature Generate EM-Syntax-Highlighted Logic File for Surveys
Dev Now shows answers (and any possible tailoring of them); Indicates which questions have EM-related errors; and records count of (and which) questions have errors that need to be fixed.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11631 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature Generate EM-Syntax-Highlighted Logic File for Surveys
Dev Now shows all EM-related Question Attributes (since some can be parsed by EM - e.g. for min/max values)
Dev Now shows all Sub-Questions with their variable names.
Dev Only things now missing are: (a) Sub-Q-level relevance (from array_filter), (b) caching for speed optimization, (c) test Group and Q-level views, (d) Enable call from admin page, (e) Optionally specify which features want to show, (f) Optionally count errors by type (relevance, validation, text) - since survey can operate with text errors
Dev Also need to add other activation validation info - probably just a test that haven't re-used question.title

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11638 b72ed6b6-b9f8-46b5-92b4-906544132732
Dev Added RDP_ prefix to all core functions and variables within ExpressionManager to indicate which subset is the Recursive Descent Parser, plus notes that only people with expertise in compiler theory/design should modify those parts.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11642 b72ed6b6-b9f8-46b5-92b4-906544132732
EM-Syntax-Highlighted Logic File for Surveys
Dev Now shows complete survey logic and tailoring as a single page.  From this, one can click on any question to edit that question on a new page.
Dev This solves the following wish-list items:
Dev Idea #101: Review all conditions - http://ideas.limesurvey.org/ideatorrent/idea/101
Dev Idea #105: Review all questions + Review all groups  - http://ideas.limesurvey.org/ideatorrent/idea/105
Dev Idea #107: How to visualize questions, logic & conditions  - http://ideas.limesurvey.org/ideatorrent/idea/107

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11644 b72ed6b6-b9f8-46b5-92b4-906544132732
New Feature Generate EM-Syntax-Highlighted Logic File for Surveys
Dev Syntax-Highlighted Logic Files now fully integrated into LS at Survey, Group, and Question levels (via a QA icon)

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_dev_tms@11645 b72ed6b6-b9f8-46b5-92b4-906544132732