diff --git a/www-api/app/Controllers/WrenchResources.php b/www-api/app/Controllers/WrenchResources.php index c2ba425c..0143841f 100644 --- a/www-api/app/Controllers/WrenchResources.php +++ b/www-api/app/Controllers/WrenchResources.php @@ -14,10 +14,14 @@ class WrenchResources extends BaseController $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true); + $a = rand(1,20); + $b = rand(1,30); + $c= $a+$b; + $next_question = [ - "question" => 'This is the question - '. rand(1000,9999), - "option" => ['aaaaaaa '. rand(1000,9999), 'bbbbbbbbb '. rand(1000,9999), 'cccccccc '. rand(1000,9999)], - "answer" => 'bbbbbb', + "question" => "What is C ?
C= $a + $b .", + "option" => [ rand(1000,9999), $c , rand(1000,9999)], + "answer" => $c, "last" => false, "points" => 10 ];