Skip to content

Commit

Permalink
Added functionality to use new function "checkgroupfordisplay" in ind…
Browse files Browse the repository at this point in the history
…ex.php. So long as this returns false, script moves to next group (or previous group). Should no longer display a page for a group where none of the conditions for display are met.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@971 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Mar 29, 2004
1 parent 0459aca commit 560cf93
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion group.php
Expand Up @@ -118,7 +118,7 @@
}
}
}

//CHECK IF ALL CONDITIONAL MANDATORY QUESTIONS THAT APPLY HAVE BEEN ANSWERED
if ((isset($_POST['conmandatory']) && $_POST['conmandatory']) && (!isset($backok) || $backok != "Y")) //Mandatory conditional questions that should only be checked if the conditions for displaying that question are met
{
$chkcmands=explode("|", $_POST['conmandatory']);
Expand Down Expand Up @@ -180,6 +180,21 @@
}
}

//SEE IF THIS GROUP SHOULD DISPLAY
//checkgroupfordisplay($gid);
if (isset($_POST['move']) && $_SESSION['step'] != 0 && $_POST['move'] != " "._LAST." " && $_POST['move'] != " "._SUBMIT." ")
{
while(checkgroupfordisplay($_SESSION['grouplist'][$_SESSION['step']-1][0]) === false)
{
if (isset($_POST['move']) && $_POST['move'] == " << "._PREV." ") {$_SESSION['step'] = $_SESSION['step']-1;}
if (isset($_POST['move']) && $_POST['move'] == " "._NEXT." >> ") {$_SESSION['step']=$_SESSION['step']+1;}
if ($_SESSION['step']-1 == $_SESSION['totalsteps'])
{
$_POST['move'] = " "._LAST." ";
break;
}
}
}
//SUBMIT ###############################################################################
if (isset($_POST['move']) && $_POST['move'] == " "._SUBMIT." ")
{
Expand Down

0 comments on commit 560cf93

Please sign in to comment.