Skip to content

Commit

Permalink
Dev: go to actual max step in group index
Browse files Browse the repository at this point in the history
Dev: remove some expression in basic (label:empty do the trick)
  • Loading branch information
Shnoulle committed Oct 25, 2016
1 parent 5b50732 commit 5383b51
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion application/helpers/expressions/em_manager_helper.php
Expand Up @@ -5623,7 +5623,7 @@ static function JumpTo($seq,$preview=false,$processPOST=true,$force=false,$chang
$message .= $LEM->_UpdateValuesInDatabase($updatedValues,true);
$LEM->runtimeTimings[] = array(__METHOD__,(microtime(true) - $now));
$LEM->lastMoveResult = array(
'finished'=>true,
'finished'=>true, /* Maybe is better to NEVER set finished to true when use JumpTo, but only when NavigateForwards */
'message'=>$message,
'gseq'=>$LEM->currentGroupSeq,
'seq'=>$LEM->currentGroupSeq,
Expand Down
4 changes: 2 additions & 2 deletions application/helpers/questionIndexHelper.php
Expand Up @@ -106,7 +106,7 @@ private function getIndexItemsGroups($type)
foreach($sessionLem['grouplist'] as $step=>$groupInfo)
{
$groupInfo['step'] = $step + 1; /* We don't have a step if group is not relevant ? */
if( ($type>1 || $groupInfo['step'] < $sessionLem['maxstep']) // type==1 : incremental : must control step (start at or -1 ?)
if( ($type>1 || $groupInfo['step'] <= $sessionLem['maxstep']) // type==1 : incremental : must control step (start at or -1 ?)
&& LimeExpressionManager::GroupIsRelevant($groupInfo['gid'])
){
$stepIndex[$step]=array(
Expand All @@ -119,7 +119,7 @@ private function getIndexItemsGroups($type)
);
if($this->getStepInfo){
/* Get the current group info */
if ($groupInfo['step'] < $sessionLem['maxstep'] && $groupInfo['step'] != $sessionLem['step']){
if ($groupInfo['step'] <= $sessionLem['maxstep'] && $groupInfo['step'] != $sessionLem['step']){
/* @todo test until maxstep, but without try to submit */
$stepInfo = LimeExpressionManager::singleton()->_ValidateGroup($step);// Danger: Update the actual group, do it only after display all question in the page
$stepIndex[$step]['stepStatus']=array(
Expand Down
4 changes: 2 additions & 2 deletions templates/basic/pstpl/question.pstpl
@@ -1,8 +1,8 @@
<div {QUESTION_ESSENTIALS} class="well question-wrapper {QUESTION_CLASS} {QUESTION_MAN_CLASS} {QUESTION_INPUT_ERROR_CLASS}">
<div class="question-text-wrapper">
{QUESTION_MANDATORY}
{if(!is_empty(QUESTION_NUMBER),"<span class='label label-default question-number'>"+QUESTION_NUMBER+"</span>","")}
{if(!is_empty(QUESTION_CODE),"<span class='label label-info question-code'>"+QUESTION_CODE+"</span>","")}
<span class='label label-default question-number'>{QUESTION_NUMBER}</span>
<span class='label label-info question-code'>{QUESTION_CODE}</span>
<div class="question-text h3 text-info">{QUESTION_TEXT}</div>
</div>
<div class="help-wrapper">
Expand Down

0 comments on commit 5383b51

Please sign in to comment.