Skip to content

Commit

Permalink
Dev Removed some obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Sep 18, 2013
1 parent db35442 commit 7f48ce8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 52 deletions.
18 changes: 9 additions & 9 deletions application/helpers/qanda_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3983,7 +3983,7 @@ function do_array_5point($ia)
{
$myfname = $ia[1].$ansrow['title'];

$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
if (strpos($answertext,'|')) {$answertext=substr($answertext,0,strpos($answertext,'|'));}

/* Check if this item has not been answered: the 'notanswered' variable must be an array,
Expand Down Expand Up @@ -4019,7 +4019,7 @@ function do_array_5point($ia)
$answer_t_content .= " onclick=\"$checkconditionFunction(this.value, this.name, this.type)\" />\n</td>\n";
}

$answertext2 = dTexts__run($ansrow['question']);
$answertext2 = $ansrow['question'];
if (strpos($answertext2,'|'))
{
$answertext2=substr($answertext2,strpos($answertext2,'|')+1);
Expand Down Expand Up @@ -4135,7 +4135,7 @@ function do_array_10point($ia)
foreach ($aSubquestions as $ansrow)
{
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
/* Check if this item has not been answered: the 'notanswered' variable must be an array,
containing a list of unanswered questions, the current question must be in the array,
and there must be no answer available for the item in this session. */
Expand Down Expand Up @@ -4269,7 +4269,7 @@ function do_array_yesnouncertain($ia)
foreach($aSubquestions as $ansrow)
{
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
/* Check if this item has not been answered: the 'notanswered' variable must be an array,
containing a list of unanswered questions, the current question must be in the array,
and there must be no answer available for the item in this session. */
Expand Down Expand Up @@ -4426,7 +4426,7 @@ function do_array_increasesamedecrease($ia)
foreach($aSubquestions as $ansrow)
{
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
/* Check if this item has not been answered: the 'notanswered' variable must be an array,
containing a list of unanswered questions, the current question must be in the array,
and there must be no answer available for the item in this session. */
Expand Down Expand Up @@ -4625,7 +4625,7 @@ function do_array($ia)
}
}
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
$answertextsave=$answertext;
if (strpos($answertext,'|'))
{
Expand Down Expand Up @@ -5125,7 +5125,7 @@ function do_array_multitext($ia)
}
}
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
$answertextsave=$answertext;
/* Check if this item has not been answered: the 'notanswered' variable must be an array,
containing a list of unanswered questions, the current question must be in the array,
Expand Down Expand Up @@ -5453,7 +5453,7 @@ function do_array_multiflexi($ia)
}
}
$myfname = $ia[1].$ansrow['title'];
$answertext = dTexts__run($ansrow['question']);
$answertext = $ansrow['question'];
$answertextsave=$answertext;
/* Check if this item has not been answered: the 'notanswered' variable must be an array,
containing a list of unanswered questions, the current question must be in the array,
Expand Down Expand Up @@ -5668,7 +5668,7 @@ function do_arraycolumns($ia)
foreach ($aQuestions as $ansrow)
{
$anscode[]=$ansrow['title'];
$answers[]=dTexts__run($ansrow['question']);
$answers[]=$ansrow['question'];
}
$trbc = '';
$odd_even = '';
Expand Down
43 changes: 0 additions & 43 deletions application/helpers/replacements_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,43 +846,6 @@ function templatereplace($line, $replacements = array(), &$redata = array(), $de

}

/**
* insertAnsReplace() takes a string and looks for any {INSERTANS:xxxx} variables
* which it then, one by one, substitutes the SGQA code with the relevant answer
* from the session array containing responses
*
* The operations of this function were previously in the templatereplace function
* but have been moved to a function of their own to make it available
* to other areas of the script.
*
* @param mixed $line string - the string to iterate, and then return
*
* @return string This string is returned containing the substituted responses
*
*/
function insertansReplace($line)
{
return $line;
}

/**
* tokenReplace() takes a string and looks for any {TOKEN:xxxx} variables
* which it then, one by one, substitutes the TOKEN code with the relevant token
* from the session array containing token information
*
* The operations of this function were previously in the templatereplace function
* but have been moved to a function of their own to make it available
* to other areas of the script.
*
* @param mixed $line string - the string to iterate, and then return
*
* @return string This string is returned containing the substituted responses
*
*/
function tokenReplace($line)
{
return $line;
}

// This function replaces field names in a text with the related values
// (e.g. for email and template functions)
Expand Down Expand Up @@ -942,10 +905,4 @@ function PassthruReplace($line, $thissurvey)
return $line;
}

function dTexts__run($text,$questionNum=NULL)
{
// return LimeExpressionManager::ProcessString($text,$questionNum,NULL,true);
return $text;
}

// Closing PHP tag intentionally omitted - yes, it is okay

0 comments on commit 7f48ce8

Please sign in to comment.