This topic is locked

Send user to specific web page depending on quiz score

9/28/2019 10:14:20 AM
PHPRunner General questions
K
karmacomposer author

I am using the latest version of PhpRunner and the quiz template.
I need to send the user to a specific web page depending on the score range of the completed quiz. How would I tackle this?
So, if the user scores a 0-20 they go to one page
If they get 21-40 they go to another page, etc, etc, etc.
Thank you for your help.
Mike

N
Nir Frumer 9/28/2019

in afterAdd event

if ($score<20) {

$page2go="yourPage1";

} elseif ($score>19 and $score < 40) {

$page2go="yourPage2";

} else {

$page2go="yourPage3";

}
header("Location: ".$page2go."php");

exit();

K
karmacomposer author 9/28/2019

Thank you. Is that in the Quiz Answers section? If not, which section AFTER ADD does it go?
Also, in

header("Location: ".$page2go."php");

exit();



Does this go in the same place? If not, where does it go? What page does "page2go." represent?
Thanks again.
Mike

K
karmacomposer author 10/1/2019

But where??? AfterAdd in which section of the quiz template?
Mike