public function getRelevantDataQuestions($gender, $age, $location) { $this->_rawLocation = $location; // Only relevant for Geelongians if ($location->getSuburb() == "Geelong" || $location->getDistrict() == "Geelong" || $location->getRegion() == "Geelong") { // Make sure we get some data for this suburb if ($this->retrieveData()) { $correctAnswer = $this->getCorrectAnswer(); $didYouKnowData = $this->getDidYouKnowData(); $lowestLevelLocation = $this->_rawLocation->getLowestLevelLocation(); $question = new DynamicQuizQuestion($this->_questionIds[0]); $question->setDescription("According to 2011 estimates, how many people will live in " . $lowestLevelLocation . " in " . $this->_projectionYear . "?"); $question->setCorrectAnswer($correctAnswer); $question->setWrongAnswers($this->generateRandomWrongAnswersForNumber($correctAnswer)); $years = $this->_projectionYear - 2011; $change = round(($this->_data[$this->_projectionYear] - $this->_data["2011"]) / $this->_data["2011"] * 100, 1); $question->setDidYouKnowHtml("<p><strong>The population of " . $lowestLevelLocation . " is estimated to grow by " . $change . "% over the next " . $years . " years.</strong></p>" . $question->generateLineChartHtml($didYouKnowData)); return array($question); } } return array(); }