本文整理汇总了PHP中LimeExpressionManager::GroupIsIrrelevantOrHidden方法的典型用法代码示例。如果您正苦于以下问题:PHP LimeExpressionManager::GroupIsIrrelevantOrHidden方法的具体用法?PHP LimeExpressionManager::GroupIsIrrelevantOrHidden怎么用?PHP LimeExpressionManager::GroupIsIrrelevantOrHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LimeExpressionManager
的用法示例。
在下文中一共展示了LimeExpressionManager::GroupIsIrrelevantOrHidden方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
//.........这里部分代码省略.........
if ($surveyMode != 'survey') {
echo templatereplace(file_get_contents($sTemplateViewPath . "survey.pstpl"), array(), $redata);
}
// runonce element has been changed from a hidden to a text/display:none one. In order to workaround an not-reproduced issue #4453 (lemeur)
// We don't need runonce actually (140228): the script was updated and replaced by EM see #08783 (grep show no other runonce)
// echo "<input type='text' id='runonce' value='0' style='display: none;'/>";
$showpopups = Yii::app()->getConfig('showpopups');
//Display the "mandatory" message on page if necessary
if (!$showpopups && $stepInfo['mandViolation'] && $okToShowErrors) {
echo "<p class='errormandatory alert alert-danger' role='alert'>" . gT("One or more mandatory questions have not been answered. You cannot proceed until these have been completed.") . "</p>";
}
//Display the "validation" message on page if necessary
if (!$showpopups && !$stepInfo['valid'] && $okToShowErrors) {
echo "<p class='errormandatory alert alert-danger' role='alert'>" . gT("One or more questions have not been answered in a valid manner. You cannot proceed until these answers are valid.") . "</p>";
}
//Display the "file validation" message on page if necessary
if (!$showpopups && isset($filenotvalidated) && $filenotvalidated == true && $okToShowErrors) {
echo "<p class='errormandatory alert alert-danger' role='alert'>" . gT("One or more uploaded files are not in proper format/size. You cannot proceed until these files are valid.") . "</p>";
}
$_gseq = -1;
foreach ($_SESSION[$LEMsessid]['grouplist'] as $gl) {
$gid = $gl['gid'];
++$_gseq;
$groupname = $gl['group_name'];
$groupdescription = $gl['description'];
if ($surveyMode != 'survey' && $gid != $onlyThisGID) {
continue;
}
$redata = compact(array_keys(get_defined_vars()));
Yii::app()->setConfig('gid', $gid);
// To be used in templaterplace in whole group. Attention : it's the actual GID (not the GID of the question)
echo "\n\n<!-- START THE GROUP (in SurveyRunTime ) -->\n";
echo "\n\n<div id='group-{$_gseq}'";
$gnoshow = LimeExpressionManager::GroupIsIrrelevantOrHidden($_gseq);
if ($gnoshow && !$previewgrp) {
echo " style='display: none;'";
}
echo " class='row'>\n";
echo templatereplace(file_get_contents($sTemplateViewPath . "startgroup.pstpl"), array(), $redata);
echo "\n";
if (!$previewquestion && trim($redata['groupdescription']) == "") {
echo templatereplace(file_get_contents($sTemplateViewPath . "groupdescription.pstpl"), array(), $redata);
}
echo "\n";
echo "\n\n<!-- PRESENT THE QUESTIONS (in SurveyRunTime ) -->\n";
foreach ($qanda as $qa) {
// Test if finalgroup is in this qid (for all in one survey, else we do only qanda for needed question (in one by one or group by goup)
if ($gid != $qa['finalgroup']) {
continue;
}
$qid = $qa[4];
$qinfo = LimeExpressionManager::GetQuestionStatus($qid);
$lastgrouparray = explode("X", $qa[7]);
$lastgroup = $lastgrouparray[0] . "X" . $lastgrouparray[1];
// id of the last group, derived from question id
$lastanswer = $qa[7];
$n_q_display = '';
if ($qinfo['hidden'] && $qinfo['info']['type'] != '*') {
continue;
// skip this one
}
$aReplacement = array();
$question = $qa[0];
//===================================================================
// The following four variables offer the templating system the
// capacity to fully control the HTML output for questions making the
示例2: FlattenText
$stepIndex = LimeExpressionManager::GetStepIndexInfo();
$lastGseq = -1;
$gseq = -1;
$grel = true;
for ($v = 0, $n = 0; $n != $_SESSION['maxstep']; ++$n) {
if (!isset($stepIndex[$n])) {
continue;
// this is an invalid group - skip it
}
$stepInfo = $stepIndex[$n];
if ($surveyMode == 'question') {
if ($lastGseq != $stepInfo['gseq']) {
// show the group label
++$gseq;
$g = $_SESSION['grouplist'][$gseq];
$grel = !LimeExpressionManager::GroupIsIrrelevantOrHidden($stepInfo['gid']);
if ($grel) {
echo '<h3>' . FlattenText($g[1]) . "</h3>";
}
$lastGseq = $stepInfo['gseq'];
}
if (!$grel || !$stepInfo['show']) {
continue;
}
$q = $_SESSION['fieldarray'][$n];
} else {
++$gseq;
if (!$stepInfo['show']) {
continue;
}
$g = $_SESSION['grouplist'][$gseq];
示例3: run
//.........这里部分代码省略.........
});
END;
}
print <<<END
}
// -->
</script>
END;
//Display the "mandatory" message on page if necessary
if (isset($showpopups) && $showpopups == 0 && $stepInfo['mandViolation'] && $okToShowErrors) {
echo "<p><span class='errormandatory'>" . $clang->gT("One or more mandatory questions have not been answered. You cannot proceed until these have been completed.") . "</span></p>";
}
//Display the "validation" message on page if necessary
if (isset($showpopups) && $showpopups == 0 && !$stepInfo['valid'] && $okToShowErrors) {
echo "<p><span class='errormandatory'>" . $clang->gT("One or more questions have not been answered in a valid manner. You cannot proceed until these answers are valid.") . "</span></p>";
}
//Display the "file validation" message on page if necessary
if (isset($showpopups) && $showpopups == 0 && isset($filenotvalidated) && $filenotvalidated == true && $okToShowErrors) {
echo "<p><span class='errormandatory'>" . $clang->gT("One or more uploaded files are not in proper format/size. You cannot proceed until these files are valid.") . "</span></p>";
}
$_gseq = -1;
foreach ($_SESSION[$LEMsessid]['grouplist'] as $gl) {
$gid = $gl[0];
++$_gseq;
$groupname = $gl[1];
$groupdescription = $gl[2];
if ($surveyMode != 'survey' && $gid != $onlyThisGID) {
continue;
}
$redata = compact(array_keys(get_defined_vars()));
echo "\n\n<!-- START THE GROUP -->\n";
echo "\n\n<div id='group-{$_gseq}'";
$gnoshow = LimeExpressionManager::GroupIsIrrelevantOrHidden($_gseq);
if ($gnoshow && !$previewgrp) {
echo " style='display: none;'";
}
echo ">\n";
echo templatereplace(file_get_contents($sTemplatePath . "startgroup.pstpl"), array(), $redata);
echo "\n";
if (!$previewquestion) {
echo templatereplace(file_get_contents($sTemplatePath . "groupdescription.pstpl"), array(), $redata);
}
echo "\n";
echo "\n\n<!-- PRESENT THE QUESTIONS -->\n";
foreach ($qanda as $qa) {
if ($gid != $qa[6]) {
continue;
}
$qid = $qa[4];
$qinfo = LimeExpressionManager::GetQuestionStatus($qid);
$lastgrouparray = explode("X", $qa[7]);
$lastgroup = $lastgrouparray[0] . "X" . $lastgrouparray[1];
// id of the last group, derived from question id
$lastanswer = $qa[7];
$q_class = getQuestionClass($qinfo['info']['type']);
$man_class = '';
if ($qinfo['info']['mandatory'] == 'Y') {
$man_class .= ' mandatory';
}
if ($qinfo['anyUnanswered'] && $_SESSION[$LEMsessid]['maxstep'] != $_SESSION[$LEMsessid]['step']) {
$man_class .= ' missing';
}
$n_q_display = '';
if ($qinfo['hidden'] && $qinfo['info']['type'] != '*') {
continue;
示例4: FlattenText
$stepIndex = LimeExpressionManager::GetStepIndexInfo();
$lastGseq = -1;
$gseq = -1;
$grel = true;
for ($v = 0, $n = 0; $n != $_SESSION['maxstep']; ++$n) {
if (!isset($stepIndex[$n])) {
continue;
// this is an invalid group - skip it
}
$stepInfo = $stepIndex[$n];
if ($surveyMode == 'question') {
if ($lastGseq != $stepInfo['gseq']) {
// show the group label
++$gseq;
$g = $_SESSION['grouplist'][$gseq];
$grel = !LimeExpressionManager::GroupIsIrrelevantOrHidden($gseq);
if ($grel) {
$gtitle = LimeExpressionManager::ProcessString($g[1]);
echo '<h3>' . FlattenText($gtitle) . "</h3>";
}
$lastGseq = $stepInfo['gseq'];
}
if (!$grel || !$stepInfo['show']) {
continue;
}
$q = $_SESSION['fieldarray'][$n];
} else {
++$gseq;
if (!$stepInfo['show']) {
continue;
}