Skip to content

Commit

Permalink
Dev Renaming Expression Manager to ExpressionScript Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Feb 11, 2020
1 parent 6cd4614 commit 26c4d59
Show file tree
Hide file tree
Showing 33 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion application/config/config-defaults.php
Expand Up @@ -719,7 +719,7 @@

// (javascript) Fix automatically the value entered in numeric question type : 1: remove all non numeric caracters; 0 : leave all caracters
$config['bFixNumAuto'] = 1;
// (javascript) Send real value entered when using Numeric question type in Expression Manager : 0 : {NUMERIC} with bad caracters send '', 1 : {NUMERIC} send all caracters entered
// (javascript) Send real value entered when using Numeric question type in ExpressionScript Engine : 0 : {NUMERIC} with bad caracters send '', 1 : {NUMERIC} send all caracters entered
$config['bNumRealValue'] = 0;

// Home page default Settings
Expand Down
2 changes: 1 addition & 1 deletion application/config/routes.php
Expand Up @@ -31,7 +31,7 @@
$route['admin/labels/<_action:\w+>'] = "admin/labels/index/<_action>";
$route['admin/labels/<_action:\w+>/<_lid:\d+>'] = "admin/labels/index/<_action>/<_lid>";

//Expression Manager tests
//ExpressionScript Engine tests
$route['admin/expressions'] = "admin/expressions/index";

//optout - optin
Expand Down
14 changes: 7 additions & 7 deletions application/controllers/admin/database.php
Expand Up @@ -276,7 +276,7 @@ private function actionUpdateDefaultValues($iSurveyID)
}
}
Yii::app()->session['flashmessage'] = gT("Default value settings were successfully saved.");
//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();

if (Yii::app()->request->getPost('close-after-save') === 'true') {
Expand Down Expand Up @@ -376,7 +376,7 @@ private function actionUpdateAnswerOptions($iSurveyID)
} // for ($sortorderid=0;$sortorderid<$maxcount;$sortorderid++)
}

//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();
LimeExpressionManager::UpgradeConditionsToRelevance($iSurveyID);
$this->_resetEM();
Expand Down Expand Up @@ -551,7 +551,7 @@ private function actionSubQuestions($iSurveyID)
}
}

//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();
LimeExpressionManager::UpgradeConditionsToRelevance($iSurveyID);
$this->_resetEM();
Expand Down Expand Up @@ -821,7 +821,7 @@ private function actionUpdateQuestion($iSurveyID)
Yii::app()->setFlashMessage(gT("Question could not be updated"), 'error');
}
}
//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();
LimeExpressionManager::UpgradeConditionsToRelevance($iSurveyID);
$this->_resetEM();
Expand Down Expand Up @@ -1075,7 +1075,7 @@ private function actionUpdateSurveyLocaleSettings($iSurveyID)
$param->save();
}
}
//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();
$this->_resetEM();

Expand Down Expand Up @@ -1183,7 +1183,7 @@ protected function actionUpdateSurveyLocaleSettingsGeneralSettings($iSurveyID)
cleanLanguagesFromSurvey($iSurveyID, implode(" ", $oSurvey->additionalLanguages));
fixLanguageConsistency($iSurveyID, implode(" ", $oSurvey->additionalLanguages));

//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag();
$this->_resetEM();

Expand Down Expand Up @@ -1518,7 +1518,7 @@ private function actionInsertCopyQuestion($iSurveyID)
}

}
//This is SUPER important! Recalculating the Expression Manager state!
//This is SUPER important! Recalculating the ExpressionScript Engine state!
LimeExpressionManager::SetDirtyFlag(); // so refreshes syntax highlighting
$redirectLink = $this->getController()->createUrl('admin/questions/sa/view/', array('surveyid' => $iSurveyID, 'gid' => $this->iQuestionGroupID, 'qid' => $this->iQuestionID));
if (Yii::app()->request->getPost('saveandnew', '') != '') {
Expand Down
2 changes: 1 addition & 1 deletion application/core/plugins/expressionFixedDbVar/config.xml
Expand Up @@ -9,7 +9,7 @@
<authorUrl>https://www.sondages.pro</authorUrl>
<version>1.0.0</version>
<license>GPL</license>
<description><![CDATA[Add SEED and other DB var in Expression Manager.]]></description>
<description><![CDATA[Add SEED and other DB var in ExpressionScript Engine.]]></description>
</metadata>

<compatibility>
Expand Down
Expand Up @@ -23,7 +23,7 @@
class expressionFixedDbVar extends PluginBase
{
protected $storage = 'DbStorage';
static protected $description = 'Add SEED and other DB var in Expression Manager.';
static protected $description = 'Add SEED and other DB var in ExpressionScript Engine.';
static protected $name = 'expressionFixedDbVar';

/**
Expand Down
4 changes: 2 additions & 2 deletions application/core/plugins/statFunctions/countFunctions.php
Expand Up @@ -15,7 +15,7 @@
class countFunctions
{
/**
* Return the count of reponse on current Expression Manager survey equal to a specific value
* Return the count of reponse on current ExpressionScript Engine survey equal to a specific value
* @param string $qCode : code of question, currently must be existing sgqa. Sample Q01.sgqa.
* @param string $comparaison : comparre with value. Can use < or > … see https://www.yiiframework.com/doc/api/1.1/CDbCriteria#compare-detail
* @param boolean $submitted (or not) response
Expand Down Expand Up @@ -46,7 +46,7 @@ public static function statCountIf($qCode, $comparaison, $submitted = true)
}

/**
* Return the count of reponse on current Expression Manager survey equal to a specific value
* Return the count of reponse on current ExpressionScript Engine survey equal to a specific value
* @param string $qCode : code of question, currently must be existing sgqa. Sample Q01.sgqa.
* @param boolean $submitted (or not) response
* @return integer|string
Expand Down
2 changes: 1 addition & 1 deletion application/core/plugins/statFunctions/statFunctions.php
Expand Up @@ -20,7 +20,7 @@
*/
class statFunctions extends PluginBase
{
protected static $description = 'Add some function in Expression Manager to get count from other responses';
protected static $description = 'Add some function in ExpressionScript Engine to get count from other responses';
protected static $name = 'statCountFunctions';

public function init()
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/SurveyRuntimeHelper.php
Expand Up @@ -69,7 +69,7 @@ class SurveyRuntimeHelper
private $LEMsessid = null;

/**
* customizable debugging for Lime Expression Manager ; LEM_DEBUG_TIMING;
* customizable debugging for Lime ExpressionScript Engine ; LEM_DEBUG_TIMING;
* (LEM_DEBUG_TIMING + LEM_DEBUG_VALIDATION_SUMMARY + LEM_DEBUG_VALIDATION_DETAIL);
* @var int
*/
Expand Down Expand Up @@ -525,7 +525,7 @@ public function run($surveyid, $args)
}

/**
* Expression Manager Scrips and inputs
* ExpressionScript Engine Scrips and inputs
*/
$step = isset($_SESSION[$this->LEMsessid]['step']) ? $_SESSION[$this->LEMsessid]['step'] : '';
$this->aSurveyInfo['EM']['ScriptsAndHiddenInputs'] = "<!-- emScriptsAndHiddenInputs -->";
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/admin/export/FormattingOptions.php
Expand Up @@ -49,7 +49,7 @@ class FormattingOptions
public $headingTextLength;

/**
* Indicates whether to use Expression Manager code
* Indicates whether to use ExpressionScript Engine code
*
* @var boolean
*/
Expand Down
8 changes: 4 additions & 4 deletions application/helpers/expressions/em_core_helper.php
Expand Up @@ -20,7 +20,7 @@
* (b) Expressions (things surrounded by curly braces) are evaluated - thereby doing LimeReplacementField substitution and/or more complex calculations
* (c) Non-expressions are left intact
* (d) The array of stringParts are re-joined to create the desired final string.
* (3) The core of Expression Manager is a Recursive Descent Parser (RDP), based off of one build via JavaCC by TMSWhite in 1999.
* (3) The core of ExpressionScript Engine is a Recursive Descent Parser (RDP), based off of one build via JavaCC by TMSWhite in 1999.
* (a) Functions that start with RDP_ should not be touched unless you really understand compiler design.
*
* @author LimeSurvey Team (limesurvey.org)
Expand Down Expand Up @@ -2465,13 +2465,13 @@ private function RDP_Tokenize($sSource, $bOnEdit = false)
}

/**
* Show a table of allowable Expression Manager functions
* Show a table of allowable ExpressionScript Engine functions
* @return string
*/
static function ShowAllowableFunctions()
{
$em = new ExpressionManager();
$output = "<div class='h3'>Functions Available within Expression Manager</div>\n";
$output = "<div class='h3'>Functions Available within ExpressionScript Engine</div>\n";
$output .= "<table border='1' class='table'><tr><th>Function</th><th>Meaning</th><th>Syntax</th><th>Reference</th></tr>\n";
foreach ($em->RDP_ValidFunctions as $name => $func) {
$output .= "<thead><tr><th>".$name."</th><th>".$func[2]."</th><th>".$func[3]."</th><th>";
Expand All @@ -2488,7 +2488,7 @@ static function ShowAllowableFunctions()
}

/**
* Show a table of allowable Expression Manager functions
* Show a table of allowable ExpressionScript Engine functions
* @return string
*/
static function GetAllowableFunctions()
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/expressions/em_manager_helper.php
Expand Up @@ -737,7 +737,7 @@ public static function SetPreviewMode($previewmode=false)
}

/**
* Tells Expression Manager that something has changed enough that needs to eliminate internal caching
* Tells ExpressionScript Engine that something has changed enough that needs to eliminate internal caching
* @return void
*/
public static function SetDirtyFlag()
Expand Down Expand Up @@ -769,7 +769,7 @@ public static function SetSurveyId($sid=NULL)
}

/**
* Sets the language for Expression Manager. If the language has changed, then EM cache must be invalidated and refreshed
* Sets the language for ExpressionScript Engine. If the language has changed, then EM cache must be invalidated and refreshed
* @param string|null $lang
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion application/helpers/questionHelper.php
Expand Up @@ -182,7 +182,7 @@ public static function getAttributesDefinitions()
"1"=>gT('Yes'),
),
'default' => "1",
'help'=>gT('Use javascript function to remove text and uncheck checkbox (or use Expression Manager only).'),
'help'=>gT('Use javascript function to remove text and uncheck checkbox (or use ExpressionScript Engine only).'),
'caption'=>gT('Remove text or uncheck checkbox automatically')
);

Expand Down
2 changes: 1 addition & 1 deletion application/libraries/PluginManager/LimesurveyApi.php
Expand Up @@ -151,7 +151,7 @@ public function tableExists(iPlugin $plugin, $sTableName)
}

/**
* Evaluates an expression via Expression Manager
* Evaluates an expression via ExpressionScript Engine
* Uses the current context.
* @param string $expression
* @return string
Expand Down
2 changes: 1 addition & 1 deletion application/models/Question.php
Expand Up @@ -182,7 +182,7 @@ public function rules()
return $aRules;
}
}
/* Question was new or title was updated : we add minor rules. This rules don't broke DB, only potential “Expression Manager” issue. */
/* Question was new or title was updated : we add minor rules. This rules don't broke DB, only potential “ExpressionScript Engine” issue. */
if (!$this->parent_qid) { // 0 or empty
/* Unicity for ExpressionManager */
$aRules[] = array('title', 'unique', 'caseSensitive'=>true,
Expand Down
2 changes: 1 addition & 1 deletion application/models/QuestionBaseDataSet.php
Expand Up @@ -374,7 +374,7 @@ protected function getRelevanceEquationInput()
'title' => gT('Condition'),
'formElementId' => 'relevance',
'formElementName' => false,
'formElementHelp' => (count($this->oQuestion->conditions)>0 ? '' :gT("A condition can be used to add branching logic. This is a rather advanced topic. If you are unsure, just leave it be.")),
'formElementHelp' => (count($this->oQuestion->conditions)>0 ? '' :gT("A condition can be used to add branching logic using ExpressionScript. Either add it directly here or use the Condition designer.")),
'inputtype' => 'textarea',
'formElementValue' => $this->oQuestion->relevance,
'formElementOptions' => [
Expand Down
Expand Up @@ -70,10 +70,10 @@
</div>
</div>

<!-- Use Expression Manager code-->
<!-- Use ExpressionScript Engine code-->
<div class="form-group row">
<label class="col-sm-12 control-label" for='emcode'>
<?php eT("Use Expression Manager code:"); ?>
<?php eT("Use Expression Engine code:"); ?>
</label>
<div class='col-sm-12'>
<?php $this->widget('yiiwheels.widgets.switch.WhSwitch', array(
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/expressions/test/functions.php
Expand Up @@ -9,7 +9,7 @@
<div class="container container-center">
<div class="row">
<div class="col-sm-12">
<h3>Functions available within Expression Manager</h3>
<h3>Functions available within ExpressionScript Engine</h3>
</div>
</div>
<div class="row">
Expand Down
4 changes: 2 additions & 2 deletions application/views/admin/expressions/test_view.php
Expand Up @@ -16,11 +16,11 @@
<tbody>
<tr>
<td><a href="<?php echo $this->createUrl('admin/expressions/sa/functions'); ?>">Available Functions</a></td>
<td>Show the list of functions available within Expression Manager.</td>
<td>Show the list of functions available within ExpressionScript Engine.</td>
</tr>
<tr>
<td><a href="<?php echo $this->createUrl('admin/expressions/sa/strings_with_expressions'); ?>">Unit Tests of Expressions Within Strings</a></td>
<td>Test how Expression Manager can process strings containing one or more variable, token, or expression replacements surrounded by curly braces.</td>
<td>Test how ExpressionScript Engine can process strings containing one or more variable, token, or expression replacements surrounded by curly braces.</td>
</tr>
<tr>
<td><a href="<?php echo $this->createUrl('admin/expressions/sa/relevance'); ?>">Unit Test Dynamic Relevance Processing</a></td>
Expand Down
16 changes: 8 additions & 8 deletions application/views/admin/super/_configuration_menu.php
Expand Up @@ -57,21 +57,21 @@
<?php endif; ?>
</li>

<!-- Expression Manager -->
<!-- ExpressionScript Engine -->
<li class="col-sm-3">
<?php if(YII_DEBUG):?>
<ul>

<!-- Expression Manager -->
<!-- ExpressionScript Engine -->
<li class="dropdown-header">
<span class="icon-expression" ></span>
<?php eT("Expression Manager");?>
<?php eT("Expression Engine");?>
</li>

<!-- Expression Manager Descriptions -->
<!-- ExpressionScript Engine Descriptions -->
<li class="dropdown-item">
<a href="<?php echo $this->createUrl("admin/expressions"); ?>">
<?php eT("Expression Manager descriptions");?>
<?php eT("Expression Engine descriptions");?>
</a>
</li>

Expand All @@ -92,21 +92,21 @@
<!-- Unit Test Dynamic Relevance Processing -->
<li class="dropdown-item">
<a href="<?php echo $this->createUrl('admin/expressions/sa/relevance'); ?>">
<?php eT("Unit test dynamic relevance processing");?>
<?php eT("Unit test dynamic ExpressionScript processing");?>
</a>
</li>

<!-- Preview Conversion of Conditions to Relevance -->
<li class="dropdown-item">
<a href="<?php echo $this->createUrl('admin/expressions/sa/conditions2relevance'); ?>">
<?php eT("Preview conversion of conditions to relevance");?>
<?php eT("Preview conversion of conditions to ExpressionScript");?>
</a>
</li>

<!-- Bulk Convert Conditions to Relevance -->
<li class="dropdown-item">
<a href="<?php echo $this->createUrl('admin/expressions/sa/upgrade_conditions2relevance'); ?>">
<?php eT("Bulk convert conditions to relevance");?>
<?php eT("Bulk convert conditions to ExpressionScript");?>
</a>
</li>

Expand Down
Expand Up @@ -385,7 +385,7 @@
<div class="help-block collapse" id="help_relevance">
<p>
<?php eT("The relevance equation can be used to add branching logic. This is a rather advanced topic. If you are unsure, just leave it be."); ?><br>
<a href="https://manual.limesurvey.org/Expression_Manager" rel="help"><?php eT("More on relevance and the Expression Manager."); ?></a>
<a href="https://manual.limesurvey.org/Expression_Manager" rel="help"><?php eT("More on relevance and the ExpressionScript Engine."); ?></a>
</p>
</div>
<div class="input-group">
Expand Down
Expand Up @@ -333,7 +333,7 @@
<div class="help-block collapse" id="help_relevance">
<p>
<?php eT("The relevance equation can be used to add branching logic. This is a rather advanced topic. If you are unsure, just leave it be."); ?><br>
<a href="https://manual.limesurvey.org/Expression_Manager" rel="help"><?php eT("More on relevance and the Expression Manager."); ?></a>
<a href="https://manual.limesurvey.org/Expression_Manager" rel="help"><?php eT("More on relevance and the ExpressionScript Engine."); ?></a>
</p>
</div>
<div class="input-group">
Expand Down
Expand Up @@ -413,7 +413,7 @@
</option>
</options>
<default>1</default>
<help>Use javascript function to remove text and uncheck checkbox (or use Expression Manager only).</help>
<help>Use javascript function to remove text and uncheck checkbox (or use ExpressionScript Engine only).</help>
<caption>Remove text or uncheck checkbox automatically</caption>
<i18n></i18n>
<readonly></readonly>
Expand Down
2 changes: 1 addition & 1 deletion tests/data/views/adminSettingsViews.php
Expand Up @@ -8,7 +8,7 @@
// General stuff ---------------------------------------
// --------------------------------------------------

// Expression Manager
// ExpressionScript Engine

['expressionsTest', ['route'=>'expressions']],
['expressionsFunctions',['route'=>'expressions/sa/functions']],
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/frontend/ArrayNumberCheckboxTest.php
Expand Up @@ -13,7 +13,7 @@
class ArrayNumberCheckboxTest extends TestBaseClassWeb
{
/**
* Check array number Expression Manager system
* Check array number ExpressionScript Engine system
*/
public function testArrayCheckboxExpression()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/frontend/JsPhpCompareTest.php
Expand Up @@ -13,7 +13,7 @@
class JsPhpCompareTest extends TestBaseClassWeb
{
/**
* Check array number Expression Manager system
* Check array number ExpressionScript Engine system
*/
public function testJsPhpCompareTestExpression()
{
Expand Down
Expand Up @@ -20,7 +20,7 @@
{# Include the form opening tag #}
{{ include('./subviews/header/start_form.twig') }} <!-- main form -->

{# This will display the script and the hidden inputs needed for Expression Manager #}
{# This will display the script and the hidden inputs needed for ExpressionScript Engine #}
{{ aSurveyInfo.EM.ScriptsAndHiddenInputs }}

{# Include the alert for no JavaScript #}
Expand Down

0 comments on commit 26c4d59

Please sign in to comment.