Skip to content

Commit

Permalink
Dev Fix USER_RIGHT_PREVIEW index issue
Browse files Browse the repository at this point in the history
Dev Fix EM for data_entry.php
Dev Fix EM undefined index when have Equation question in Group-by-Group

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey_ci@11164 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
TMSWhite committed Oct 14, 2011
1 parent ca4933b commit a7f5c3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/dataentry.php
Expand Up @@ -2325,7 +2325,7 @@ function view($surveyid,$lang=NULL)
$cdata['qidattributes'] = $qidattributes;
$hidden = (isset($qidattributes['hidden']) ? $qidattributes['hidden'] : 0);
// TODO - can questions be hidden? Are JavaScript variables names used? Consistently with everywhere else?
LimeExpressionManager::ProcessRelevance($qidattributes['relevance'],$deqrow['qid'],NULL,$deqrow['type'],$hidden);
// LimeExpressionManager::ProcessRelevance($qidattributes['relevance'],$deqrow['qid'],NULL,$deqrow['type'],$hidden);

//GET ANY CONDITIONS THAT APPLY TO THIS QUESTION
$explanation = ""; //reset conditions explanation
Expand Down
2 changes: 1 addition & 1 deletion application/controllers/survey.php
Expand Up @@ -1017,7 +1017,7 @@ function _canUserPreviewSurvey($surveyId)
}

function _userHasPreviewAccessSession($surveyId){
return isset($_SESSION['USER_RIGHT_PREVIEW']) || $_SESSION['USER_RIGHT_PREVIEW'] != $surveyId;
return (!(isset($_SESSION['USER_RIGHT_PREVIEW']) && ($_SESSION['USER_RIGHT_PREVIEW'] == $surveyId)));
}

function _killPage(&$redata, $iDebugLine, $sTemplateDir = null, $asMessage = array(), $bKillSession = false)
Expand Down
2 changes: 2 additions & 0 deletions application/libraries/Group_format.php
Expand Up @@ -1299,6 +1299,8 @@ function checkconditions(value, name, type)
}
if ($qa[8] == '*')
{
// TMW - replace this with a call to EM to get hidden attribute status
$eqnAttributes = getQuestionAttributeValues($qa[4], $qa[8]);
if ($eqnAttributes['hidden']==1) {
$n_q_display = ' style="display: none;"';
}
Expand Down

0 comments on commit a7f5c3d

Please sign in to comment.